Change History (17)

Not so simple to fix because we'd need to go into more depth when parsing out these scripts so as to do different things in attributes. And we can't parse it using the DOM because of course it's not valid XML/HTML. Tricky.

Xinha should not strip out any valid attribute with well formed content. My suspicion here is that the attribute isn't well formed or valid.

Example, if you had something like

<span <?php echo $On ? 'class="foo"' : '' ?> >

what would you "massage" that into for preserve scripts? You'd have to stick it into some special attribute.

It's probably possible, with adjustments to PreserveScripts? and also to the getHtmlMethod you use. Incidentally, you should try switching them to check the behavior in each, you may find that one already does what you want.