Windows 8.1 App – jQuery Version 2.1.0 causing HTML1701: Unable to add dynamic content errors
If you are developing Windows 8.1 Apps, it appears an issue with jQuery version 2.1.0 causes “HTML1701: Unable to add dynamic content…” errors. This occurs even if jQuery code is not in use, but merely the link to jQuery is included in your code. Switching to jQuery 2.0.2 resolved the issue for me. The errors were as follows:
HTML1701: Unable to add dynamic content ”. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement. For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.
HTML1701: Unable to add dynamic content ”. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement. For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.
I am sure that this issue will be resolved, but in the meantime, I hope this helps others who may come across these error messages.
Thanks for this info. I just ran into the same problem, and you saved me time and effort. Seems like this would have been an easy bug for QA to have found.
This worked for me aswell thanks!
Still months later this bug persists and i could not make it work with the latest version (Jquery 2.1.1 at the time of writing).
You just saved me a ton of agro. I was starting to go down the rabbit hole looking for something I’d done wrong.