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

Often 3rd party markup is being inserted and it is not always valid. Thi... #43

Closed ironfroggy closed 12 years ago

ironfroggy commented 12 years ago

...s allows writeCapture to handle (note the missing space between attributes) which browsers actually will deal with, but will break the handling of async load callbacks and fail to load the code.

ironfroggy commented 12 years ago

I understand this may be rejected if it is not desired to allow such invalid markup. I leave that up to the discretion of the project owner.

iamnoah commented 12 years ago

I'd like to merge this, but I'd need some tests to show that it parses correctly and that the edge cases are handled correctly. e.g., what about this?

<script type='text/javascript'src='something.js'></script>

Also, will all browsers parse that correctly if it's written in a document.write? It's possible the 3rd party script is using a browser specific bug.

ironfroggy commented 12 years ago

I'll do some testing to confirm your questions. As for the single quoted version, I suppose that should be handled, as well, if browsers allow it. I'll update the request when I've done some tests.

On Tue, Jan 10, 2012 at 10:44 AM, noah reply@reply.github.com wrote:

I'd like to merge this, but I'd need some tests to show that it parses correctly and that the edge cases are handled correctly. e.g., what about this?

   

Also, will all browsers parse that correctly if it's written in a document.write? It's possible the 3rd party script is using a browser specific bug.


Reply to this email directly or view it on GitHub: https://github.com/iamnoah/writeCapture/pull/43#issuecomment-3431532

Read my blog! I depend on your acceptance of my opinion! I am interesting! http://techblog.ironfroggy.com/ Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

ironfroggy commented 12 years ago

This has been updated after some internal review lead to an improved solution.

iamnoah commented 12 years ago

Cool. I'd still like to see a test before I merge it.