Something realy strange happend when i try use Tidy2 on my html pages.
HTML Entities change from this
to this xA0 (screenshot)
I try different settings in config file but nothing help. Please, some advise
The primary step is to install the XML tools using the Plugin Manager. Then navigate to Menu -> Plugins -> XML Tools -> Pretty Print. You can use the shortcut Ctrl + Alt + Shift + B. For the other older versions, you need to navigate to Menu -> text FX -> HTML Tidy -> Tidy: Reindent XML.
When you make a change and save the HTML file, you can hit refresh on that preview window. Alternately, you can just use Notepad++'s built-in View > View Current File in … submenu, and choose to load your HTML file in Chrome, Edge, Firefox, or (shudder) IE.
You need to set the preserve-entities to 1
http://tidy.sourceforge.net/docs/quickref.html#preserve-entities
just add to the end of the config file
preserve-entities: 1
to open the config file go to: Plugins > Tidy2 > Edit config n
source: https://stackoverflow.com/a/6669947/2455951
There you will find how to do a configuration. Each key word has its corresponding reasons.
I just try to change the default config to achieve my purpose. I wanted to avoid thisgs as
''' when my code was '''
. (probably your problem)
At the end the problem was to set.
quote-marks: no
The reason I found in the file 'Show Config Help' is:
This option specifies if Tidy should output " characters as " as is preferred by some editing environments. The apostrophe character ' is written out as ' since many web browsers don't yet support '.
2.1 I use Plugins->Tidy2->Edit config1
2.2 I applied it with Plugins->Tidy2->tidy (config 2)
Mi config file is this:
indent: auto
indent-spaces: 2
wrap: 132
markup: yes
output-html: yes
numeric-entities: yes
quote-marks: no
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
new-inline-tags: cfif, cfelse, math, mroot,
mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,
munder, mover, mmultiscripts, msup, msub, mtext,
mprescripts, mtable, mtr, mtd, mth
new-blocklevel-tags: cfoutput, cfquery
new-empty-tags: cfelse
char-encoding: latin1
output-encoding: no
input-encoding: no
I encoutered the same problem. After search and experiment, I found that UTF-8 encoding and these settings don't change '  (the definitive setting is numeric-entities: no):
indent: auto
indent-spaces: 2
wrap: 132
markup: yes
output-html: yes
numeric-entities: no
quote-marks: no
quote-nbsp: yes
quote-ampersand: no
break-before-br: no
uppercase-tags: no
uppercase-attributes: no
new-inline-tags: cfif, cfelse, math, mroot,
mrow, mi, mn, mo, msqrt, mfrac, msubsup, munderover,
munder, mover, mmultiscripts, msup, msub, mtext,
mprescripts, mtable, mtr, mtd, mth
new-blocklevel-tags: cfoutput, cfquery
new-empty-tags: cfelse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With