I have html pages that I would like to compare revision control copies against sandbox copies against production copies. They all contain the same javascript, and the javascript includes strings containing reserved characters in HTML (the javascript composes a hyperlink tag, for example).
In addition, all of the pages contain <PARAM> tags, each of which has a different VALUE attribute containing XML data, enclosed in single quotes. The XML data contains (not surprisingly) XML reserved characters, including "<" and ">" and so forth, which are also reserved in HTML.
I've done comparisons using some of the HTML file formats and some of the XML formats (I can no longer remember which ones), and they seem to mangle the javascript and the VALUE attribute to varying degrees *behind the scenes*. That is, when I do the comparison, everything looks fine. If I copy from one side to the other, and then save the changes, the underlying file format algorithm escapes reserved characters, breaking the javascript (so far, I haven't detected any problems with the XML data, but I'm still looking). There is also an issue with how entities such as CR/LF characters ( &#13;&#10; ) that are included in the XML are handled. In some cases, they are being written as their character values rather than as HTML entities.
I love the idea of displaying these files with the HTML formatted consistently, and I tried to hack together one that would also sort attributes the way the XML one does. But this cool feature is markedly less useful if attempting to save changes results in corrupting my files.
Does anyone have any suggestions? Perhaps I'm just choosing the wrong file format, or perhaps there's a setting I can modify so it won't make these changes behind my back.
Thanks,
Rebeccah
In addition, all of the pages contain <PARAM> tags, each of which has a different VALUE attribute containing XML data, enclosed in single quotes. The XML data contains (not surprisingly) XML reserved characters, including "<" and ">" and so forth, which are also reserved in HTML.
I've done comparisons using some of the HTML file formats and some of the XML formats (I can no longer remember which ones), and they seem to mangle the javascript and the VALUE attribute to varying degrees *behind the scenes*. That is, when I do the comparison, everything looks fine. If I copy from one side to the other, and then save the changes, the underlying file format algorithm escapes reserved characters, breaking the javascript (so far, I haven't detected any problems with the XML data, but I'm still looking). There is also an issue with how entities such as CR/LF characters ( &#13;&#10; ) that are included in the XML are handled. In some cases, they are being written as their character values rather than as HTML entities.
I love the idea of displaying these files with the HTML formatted consistently, and I tried to hack together one that would also sort attributes the way the XML one does. But this cool feature is markedly less useful if attempting to save changes results in corrupting my files.
Does anyone have any suggestions? Perhaps I'm just choosing the wrong file format, or perhaps there's a setting I can modify so it won't make these changes behind my back.
Thanks,
Rebeccah
Comment