Subject: | improper nesting of html attributes |
Hi
Two brief issues.
The first relates to extra html end-attribute markers that make the html invalid. The second is the nesting of html attributes.
=====
When I mark text in WordXP with any text attribute (e.g. strikeout) I get a lot of extra end-attribute markers from rtf2html.
=====
Example: A single word marked as strikeout generated this rtf:
=====
{\strike\insrsid11875762\charrsid11875762 \hich\af0\dbch\af11\loch\f0 St\hich\af0\dbch\af11\loch\f0 r\hich\af0\dbch\af11\loch\f0 ikeout}{\strike\insrsid5449462\charrsid11875762
\par }{\insrsid11875762 \hich\af0\dbch\af11\loch\f0 H}{\sub\insrsid11875762\charrsid11875762 \hich\af0\dbch\af11\loch\f0 2}{\insrsid11875762 \hich\af0\dbch\af11\loch\f0 0
etc.
========
which then yields this html:
========
<p ALIGN=LEFT><strike>Strikeout</strike></strike></p>
<p ALIGN=LEFT></strike>H<sub>2</sub>0</p>
etc.
=========
This also occurs with bold, underline, italic, etc.
The second issue is that when the rtf contains {\i\b\ul Hello World}
then the HTML generated is <i><b><u> Hello World</i></b></u>
which we think is perhaps not nested correctly.
================
Despite these minor problems, we thank you for your clear, functional, and very useful code!
-- Craig Feied