--- markup/html/scripting-parser/parser.html 2008/04/20 12:19:13 1.4
+++ markup/html/scripting-parser/parser.html 2008/04/25 11:40:56 1.5
@@ -77,6 +77,14 @@
return '';
});
if (token) return token;
+ var m;
+ if ((p.insertionPoint < ']+)>/, function (s, e) {
- if (p.insertionPoint < s.length) {
+ i.s = i.s.replace (/^<\/([^>]+)(?:>|$)/, function (s, e) {
+ if (p.insertionPoint < s.length ||
+ (p.insertionPoint <= s.length &&
+ s.substring (s.length - 1, 1) != '>')) {
token = {type: 'abort'};
return s;
}
@@ -98,8 +108,10 @@
return '';
});
if (token) return token;
- i.s = i.s.replace (/^<([^>]+)>/, function (s, e) {
- if (p.insertionPoint < s.length) {
+ i.s = i.s.replace (/^<([^>]+)(?:>|$)/, function (s, e) {
+ if (p.insertionPoint < s.length ||
+ (p.insertionPoint <= s.length &&
+ s.substring (s.length - 1, 1) != '>')) {
token = {type: 'abort'};
return s;
}
@@ -212,6 +224,7 @@
this.openElements[this.openElements.length - 1].appendChild (el);
// 11. Let the insertion point have the value of the old ...
+ oldInsertionPoint += this.insertionPoint;
this.setInsertionPoint (oldInsertionPoint);
// 12. If there is a script that will execute as soon as ...