diff options
author | Uwe Steinmann <steinm@php.net> | 2000-03-09 12:45:55 +0000 |
---|---|---|
committer | Uwe Steinmann <steinm@php.net> | 2000-03-09 12:45:55 +0000 |
commit | ff2443eb6791d79a478e73282a233cdb8846cdfb (patch) | |
tree | 425aeea6fa1c7eccd118995d73df92dd37bfff87 /ext/hyperwave | |
parent | ba5089812341c9bf9f845c49670382e7de0a6d5b (diff) | |
download | php-git-ff2443eb6791d79a478e73282a233cdb8846cdfb.tar.gz |
- bug fix, insertion of links back into HTML document
- smarter test script
Diffstat (limited to 'ext/hyperwave')
-rw-r--r-- | ext/hyperwave/hg_comm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/hyperwave/hg_comm.c b/ext/hyperwave/hg_comm.c index 45ee5c6ca8..a3fe28265d 100644 --- a/ext/hyperwave/hg_comm.c +++ b/ext/hyperwave/hg_comm.c @@ -461,7 +461,7 @@ DLIST *fnCreateAnchorList(hw_objectID objID, char **anchors, char **docofanchorr char *htmlattr, *str2; int offset; str1 = object; - htmlattr = emalloc(strlen(object)); + htmlattr = emalloc(strlen(object)); /* alloc mem big enough for htmlattr */ htmlattr[0] = '\0'; offset = 0; while(NULL != (str = strstr(str1, "HtmlAttr="))) { @@ -469,7 +469,9 @@ DLIST *fnCreateAnchorList(hw_objectID objID, char **anchors, char **docofanchorr str1 = str; while((*str1 != '\n') && (*str1 != '\0')) str1++; - if(NULL != (str2 = strchr(str, '='))) { + /* Find the '=' in the HTML attr and make sure it is part of the + attr and not somewhere in the objrec. */ + if((NULL != (str2 = strchr(str, '='))) && (str2 < str1)) { str2++; strncpy(&htmlattr[offset], str, str2 - str); offset = offset + (str2 - str); |