开发者

Double space replaced automatically with single space when using TIDY HTML, and i dont want that to happen

I am using HTML TIDY and I see that if there is double开发者_JAVA百科 space in my text/HTML to be fixed, Tidy would replace the double space with a single space, and I do not what that to happen, any help would be great???? here is my config for HTML Tidy.

tidy-mark: no
show-errors: 6
show-warnings: yes
output-xml: no
enclose-text: yes
wrap: 0
uppercase-tags: yes
uppercase-attributes: yes
show-body-only: yes
new-inline-tags: replaced,city,place,personname,country-region


In most places in HTML, double spaces are treated as single spaces by the browser. That is likely why HTML Tidy replaces them: they just take space in your HTML file for no benefit. You need non-breaking spaces if you actually want two spaces to appear.


Use option literal-attributes: yes (by default no) to not replace double space by single space inside attributes (where it should matters).

A typical case where you have something like :

<a href="/somewhere  .htm">click here</a>

And you need to keep the double space for the link to still works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜