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 the element.setAttribute() method within Cloudflare Workers’ HTMLRewriter. When attempting to set attributes for HTML elements using this method, if the attribute value is enclosed in single quotes ('), HTMLRewriter converts it to double quotes ("). This results in attribute values being enclosed in double quotes.
Is there any way to keep the original surrounding quotes, after element.setAttribute() sets the attribute?
I’m using the element.setAttribute() method within Cloudflare Workers’ HTMLRewriter. When attempting to set attributes for HTML elements using this method, if the attribute value is enclosed in single quotes ('), HTMLRewriter converts it to double quotes ("). This results in attribute values being enclosed in double quotes.
Is there any way to keep the original surrounding quotes, after element.setAttribute() sets the attribute?
This issue resembles a similar issue found in cheerio
Maintain tag attribute quote characters · Issue #720 · cheeriojs/cheerio · GitHub
use single quotes for values that contain double quotes
The text was updated successfully, but these errors were encountered: