summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-17 18:25:48 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-17 18:25:48 +0000
commitafb797974e8ef2c0b49d7f93515e18669ed3694f (patch)
treeccd45ab5a5131325286f71c83ae649972bccbdaa /src
parent7943d83e29f729c2b9f08918fa1f94cf56124f5a (diff)
Fixed "onMouseOver="src='image'" is not recognized" and MANY other javascript issues (http://code.google.com/p/httrack/issues/detail?id=4)
Diffstat (limited to 'src')
-rw-r--r--src/htsparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/htsparse.c b/src/htsparse.c
index f31207b..09367a0 100644
--- a/src/htsparse.c
+++ b/src/htsparse.c
@@ -1218,7 +1218,7 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
/* OK, événement repéré */
if (p) {
inscript_tag_lastc = *(adr + p); /* à attendre à la fin */
- adr += p + 1; /* saut */
+ adr += p /*+ 1*/; /* saut */
/*
On est désormais dans du code javascript
*/
@@ -1404,6 +1404,8 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
int nc;
nc = strfield(adr, ".src"); // nom.src="image";
+ if (!nc && inscript_tag && inscript_tag_lastc == *(adr - 1))
+ nc = strfield(adr, "src"); // onXXX='src="image";'
if (!nc)
nc = strfield(adr, ".location"); // document.location="doc"
if (!nc)
@@ -1437,8 +1439,6 @@ int htsparse(htsmoduleStruct * str, htsmoduleStructExtended * stre) {
expected_end = ")"; // fin: parenthèse
can_avoid_quotes = 1;
quotes_replacement = ')';
- } else {
- nc = 0;
}
if (!nc)
if ((nc = strfield(adr, "import"))) { // import "url"