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
@chiccorosso sorry you are going to have to explain more exactly what is the problem... and what config are you using, if any...
When I run tidy 5.5.14 latest, or release 5.4.0, that <script src="glb_LInk.js"></script> is NOT removed?
Yes, I can see your myTEST.htm file is in UTF-16, with a BOM to indicate that, so tidy inputs it as UTF-16... Tidy does not look for meta charset="???"> tag to set the input encoding, but it does use the BOM...
Since I added no encoding to the config, tidy complains that the default input encoding (utf-8) does not match the actual (utf-16), as indicated by the BOM -
line 1 column 1 - Warning: specified input encoding (utf-8) does not match actual input encoding (utf-16)
Again in the absence of a config, tidy used its default of utf-8 for output... the first part of the output is -
<!DOCTYPE html><html><head><metaname="generator" content=
"HTML Tidy for HTML5 for Windows version 5.5.14"><linkhref="../STILI.CSS" rel="stylesheet" type="text/css"><scriptsrc="glb_LInk.js"></script><title></title></head><bodyclass="IndexTop"><pclass="TitoloIndice">USO DELLA MACCHINA</p><ul><liclass="VoceElenco Linked"><ahref="Ind_Introduzione.htm"
target="Dn_right" onclick=
"parent.frames[1].location.href="Pag_Pulsantiera.htm"">INTRODUZIONE</a></li><liclass="VoceElenco Linked"><scriptlanguage="JavaScript">glb_1_PageLinkOnClick("Ind_Navigazione.htm","NAVIGAZIONE","Dn_right","Pag_glbHMI_Uso_pulsanti.htm");</script></li><liclass="VoceElenco Linked"><scriptlanguage="JavaScript">glb_1_PageLinkOnClick("Ind_Dati_visibili.htm","DATI SEMPRE VISIBILI","Dn_right","Pag_glbHMI_Banner_allarmi.htm");</script></li>
... and so on
And except for the tidy mark, the output of tidy version 5.4.0 is exactly the same...
Yes, tidy does complain that the <a> contains unexpected or duplicate quote marks, but seems to fix the <a> tags, and converts the unexpected " to ", which again looks fine... and it corrects the malformed target and onclick attributes...
What is wrong here? It seems all script tags have been maintained, or am I missing something very obvious?
Maybe I do not understand... please try to explain more exactly what problem you see... thanks...
Activity
chiccorosso commentedon Apr 12, 2017
Closed. My fault. I apologize.
geoffmcl commentedon Apr 12, 2017
@chiccorosso glad this got closed...
I had done many tests, and was unable to duplicate...
No problem... now closed... thanks...
chiccorosso commentedon Apr 13, 2017
Then I'm uploading this file. As you can see the code is very malformed.
The code:
<SCRIPT src="glb_LInk.js"></SCRIPT>Gets removed by tidy because of the A tag with malformed target and onclick attributes.
I have this script call in hundreds of files and where there is that malformed "A" code it gets removed.
I can't understand if it's because of the malformed code of because of the fact that the file is utf-16 with no char code specification.
If you can help in this for sure I'll save a lot of time. If this can help you in improving tidy I'll be very happy for this.
Here's the file:
myTEST.zip
chiccorosso commentedon Apr 13, 2017
Thank you very much for your attention!
geoffmcl commentedon Apr 13, 2017
@chiccorosso sorry you are going to have to explain more exactly what is the problem... and what config are you using, if any...
When I run tidy 5.5.14 latest, or release 5.4.0, that
<script src="glb_LInk.js"></script>is NOT removed?Yes, I can see your
myTEST.htmfile is in UTF-16, with a BOM to indicate that, so tidy inputs it as UTF-16... Tidy does not look formeta charset="???">tag to set the input encoding, but it does use the BOM...Since I added no encoding to the config, tidy complains that the default input encoding (utf-8) does not match the actual (utf-16), as indicated by the BOM -
Again in the absence of a config, tidy used its default of utf-8 for output... the first part of the output is -
And except for the tidy mark, the output of tidy version 5.4.0 is exactly the same...
Yes, tidy does complain that the
<a>contains unexpected or duplicate quote marks, but seems to fix the<a>tags, and converts the unexpected"to", which again looks fine... and it corrects the malformedtargetandonclickattributes...What is wrong here? It seems all script tags have been maintained, or am I missing something very obvious?
Maybe I do not understand... please try to explain more exactly what problem you see... thanks...
geoffmcl commentedon Nov 30, 2017
No comments in a long, long time...
Maybe it solved itself ;=)), so closing this...
Feel free to re-open, or file a new issue... thanks...