[Seaside] [FIX] liverUpdate JavaScript problem

James Megquier jmegq at post.harvard.edu
Fri Jan 7 23:11:09 CET 2005


> Just regular drugs.

Are you kidding?  That's not even context-free, let alone regular! ;-)

>> var regex = /<(\w+)[^>]*id="(\w+)"[^>]*>((.|\n|\r)*)<\/\1>/;

Perhaps "liverUpdate" has something to do with the amount of gin 
required to parse this.

It matches too much for this case, for example:

"<html><body>
   <span id=\"foo\">FOO
     <span id=\"bar\">BAR</span>
   </span>
   <span id=\"oops\">OOPS</span>
</body></html>"

I don't think it can be fixed, even with beefy modern regexes -- unless 
you build a parse tree so you can match up the end tags.

-James



More information about the Seaside mailing list