#354 quote-element-tags configuration option

closed-out-of-date
nobody
5
2016-04-03
2010-10-28
Rebeccah
No

I have been unable to get Tidy to leave the content of my atrtibute values unchanged. These attribute values are produced by MS Access, and are not SGML-compliant - one of them contains an un-escaped XML document containing the data model for the page. Every option I have tried in Tidy ends up converting the "<" and ">" characters in the attribute value to "&lt," and "&gt;".

I realize that this is the "right" thing to do from the standpoint of fixing HTML errors, but it is wrong from the standpoint of readability and makes it very difficult to tell if two of these generated pages have the same data model or not, since the elements don't get indented since they are within an attribute..

Tidy already has
quote--ampersand, which allows standalone "&" characters to be left alone if desired (though it defaults to yes),
and quote-marks, that is no by default and leaves """ and "'" alone,
and quote-nbsp, which allows non-breaking spaces to be left alone if desired.

Would it be possible to implement a similar feature for "<" and ">" inside attributes and other places where Tidy would otherwise guess they should be escaped? literal-attributes, which allows white space inside atributes to be left alone, doesn't seem to do the trick (whether it is set to yes or to no).

Thanks,

Rebeccah Quevedo-Prastein

(p.s. sorry for posting this request directly to the mailing list as well; My first time to this web site I couldn't find where to add a new request.)

Discussion

  • Rebeccah

    Rebeccah - 2010-10-28

    I guess this would be for a future release, not the current one, eh?

     
  • Rebeccah

    Rebeccah - 2010-10-28
    • milestone: 227664 --> Future - all platforms
     
  • Geoff

    Geoff - 2016-04-03

    Thanks for the feature request... now so long ago... sorry for the delay...

    Tidy source has moved on to https://github.com/htacg/tidy-html5, site to http://www.html-tidy.org/

    I must admit I can not really see a use case for not converting the < and > characters in the attribute value to &lt; and &gt;, but maybe you have your reasons.

    However, if you want to persue this, or find another tidy bug, or feature request, then please file an issue, together with sample html and config used, and if you find, fix, and test the feature in a tidy fork then you can issue a Pull Request. Always appreciated... thanks...

    Tidy needs your support...

    Meantime closing this here as out-of-date...

     
  • Geoff

    Geoff - 2016-04-03
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks