当我尝试在我的html页面上使用Tidy2时,有些奇怪的事情发生了。 HTML实体从此
更改为此xA0(screenshot)
我在配置文件中尝试不同的设置但没有任何帮助。请一些人建议
您需要将preserve-entities设置为1
http://tidy.sourceforge.net/docs/quickref.html#preserve-entities
只需添加到配置文件的末尾
preserve-entities: 1
打开配置文件转到:插件> Tidy2>编辑配置n
在那里,您将找到如何进行配置。每个关键词都有其相应的原因。
我只是尝试更改默认配置以实现我的目的。当我的代码是'''
时,我想避免使用'#39'。 (可能是你的问题)
最后问题是设定。
quote-marks: no
我在“显示配置帮助”文件中找到的原因是:
此选项指定Tidy是否应输出某些编辑环境首选的“字符”。撇号字符'写成'因为许多网络浏览器还不支持'。
2.1我使用插件 - > Tidy2->编辑config1
2.2我用Plugins-> Tidy2-> tidy(config 2)应用它
Mi配置文件是这样的:
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
我遇到了同样的问题。经过搜索和实验,我发现UTF-8编码和这些设置不会改变'& nbsp; (最终设置是数字实体:否):
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
我相信这与您的编码设置有关。
检查你是否有char-encoding: raw
或output-encoding: raw
。在这种情况下,您需要将其更改为您需要的任何编码(例如utf8)。
快速解决:
主菜单 - >编码 - >用ANSI编码
默认配置文件正常。
如果你有编码utf8没有bom将其转换为utf8
我的配置是:indent:auto indent-spaces:2 quiet:yes input-encoding:utf8 output-encoding:utf8