8

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

1
  • dead dropbox link :/ Commented Apr 1, 2019 at 21:37

6 Answers 6

7

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

Sign up to request clarification or add additional context in comments.

Comments

2
  1. If you use Tidy2, go to: Plugins->Tidy2->Show Config Help

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 '&#39' 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 '.

  1. I'm working with HTML5 and using an encoding in latin1:

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

1 Comment

As of 2017-May-04 Help points to a 404 page. The package maintainer needs to update the reference.
1

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

Comments

0

I believe this has something to do with your encoding settings.

Check if you have char-encoding: raw or output-encoding: raw. In that case you need to change it to whatever encoding you need (utf8 for example).

1 Comment

both exist, both set in utf8, not help at all
0

Quick Fix:

Main Menu -> Encoding -> Encode in ANSI

The default config file is OK.

Comments

0

If you have encoding utf8 without bom convert it to utf8

my config is: indent: auto indent-spaces: 2 quiet: yes input-encoding: utf8 output-encoding: utf8

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.