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
Hi,
This library works fine for all my use cases. But for some cases, I need to add the HTML attribute in single quotes instead of double.
Like
original string <a href='www.example.com'>
after setting target attribute it becomes <a href='www.example.com' target="_blank">
but need <a href='www.example.com' target='_blank'>
Do you have any option to do it?
The text was updated successfully, but these errors were encountered:
cakkermans
changed the title
Use Single quotes instead of double
Enforce single quotes instead of double quotes for attributes
Apr 1, 2023
Unfortunately there is no feature to do this. The HTML5 standard allows single, double and no quotes on attributes, so there is nothing wrong with them.
The HtmlAgilityPack does seem to be able to read and control the quote type on attributes using HtmlAttribute.QuoteType, so I think this feature could be developed.
Hi,
This library works fine for all my use cases. But for some cases, I need to add the HTML attribute in single quotes instead of double.
Like
original string
<a href='www.example.com'>
after setting target attribute it becomes
<a href='www.example.com' target="_blank">
but need
<a href='www.example.com' target='_blank'>
Do you have any option to do it?
The text was updated successfully, but these errors were encountered: