iamnoah / writeCapture

Utility to assist the Ajax loading of HTML containing script tags that use document.write. Mailing List: http://groups.google.com/group/writecapturejs-users
http://iamnoah.github.com/writeCapture
Other
241 stars 38 forks source link

Fails with <script foo="bar"src="baz"> #41

Closed joehoyle closed 13 years ago

joehoyle commented 13 years ago

writeCapture fails if the script has non space before the src attribute. this is probably incorrect behaviour on this publisher's part, but this maybe something writecapture could work around.

I modified attrPattern to

    function attrPattern(name) {
        return new RegExp('[\\s\\r\\n]?'+name+'=(?:(["\'])([\\s\\S]*?)\\1|([^\\s>]+))','i');
    }
iamnoah commented 13 years ago

Can you open a pull request? Thanks.