You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a third party .net/js library which sticks json in to a data- attribute on a div and then uses it to hydrate. The HtmlAttributeValueHelpers.Encode method seems to break the Javascript. I'm not positive which character replacement causes it, but my guess is ". It would be great to either have a setting to disable/enable this, or allow for some dependency injection with our own service, or have a way to ignore certain fields.
As it stands there is no easy way to do this, and I worked around it by disabling for my path/request.
The text was updated successfully, but these errors were encountered:
I'm using a third party .net/js library which sticks json in to a data- attribute on a div and then uses it to hydrate. The HtmlAttributeValueHelpers.Encode method seems to break the Javascript.
Could you give a specific example: name of .NET/JS library, error message, HTML code before and after minification.
I'm not positive which character replacement causes it, but my guess is ".
It might make sense for you to experiment with the AttributeQuotesStyle setting (see the “HTML Minifier” section documentation). You can use the WebMarkupMin Online site to experiment with HTML code.
For now, as a temporary solution, you can wrap this div in a ignoring comment tag.
I'm using a third party .net/js library which sticks json in to a data- attribute on a div and then uses it to hydrate. The HtmlAttributeValueHelpers.Encode method seems to break the Javascript. I'm not positive which character replacement causes it, but my guess is ". It would be great to either have a setting to disable/enable this, or allow for some dependency injection with our own service, or have a way to ignore certain fields.
As it stands there is no easy way to do this, and I worked around it by disabling for my path/request.
The text was updated successfully, but these errors were encountered: