Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace html tag (<u></u>) with invalid self-closing tag (<u/>) #171

Open
stark-mkl opened this issue Apr 8, 2019 · 0 comments
Open

Replace html tag (<u></u>) with invalid self-closing tag (<u/>) #171

stark-mkl opened this issue Apr 8, 2019 · 0 comments

Comments

@stark-mkl
Copy link

stark-mkl commented Apr 8, 2019

I have this email body:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head></head><body> <div> <br> <u></u> <p>xxxxx, </p><p>XXX – xxxxxxxxxxxxxx</p><p>xxxxxxxxxxxxxxxxxxxxxxx</p><p>xxxxxxxxxxxx</p><p><br></p><p>xxxxxxxx</p><p>xx &amp; the xxxx xxxx </p><p><br></p><br><hr><p> <span style="font-size:11px;font-family:&quot;Arial&quot;,sans-serif;color:#6f787f;background:white">xxxxxxxxxxx<strong>xxxxxx</strong>xxxxxxxx <strong>xxxxx</strong>xxxxxxxx</span> <span style="font-size:11px;font-family:&quot;Arial&quot;,sans-serif;color:#6f787f"><br><br> </span> </p> <img src="https://mandrillapp.com/track/open.php?u=xxxxxxx&amp;id=xxxxx" height="1" width="1"> </div> </div> <br clear="both"> </body></html>

which contains a text empty <u></u> tag. After pass it to MoveCssInline(), the <u></u> is replaced with <u/> that is invalid and causes the rest text to be underlined:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head /><body> <div> <br /> <u /> <p>xxxxx,&#160;</p><p>XXX – xxxxxxxxxxxxxx</p><p>xxxxxxxxxxxxxxxxxxxxxxx</p><p>xxxxxxxxxxxx</p><p><br /></p><p>xxxxxxxx</p><p>xx &amp; the xxxx xxxx </p><p><br /></p><br /><hr /><p> <span style="font-size:11px;font-family:&quot;Arial&quot;,sans-serif;color:#6f787f;background:white">xxxxxxxxxxx<strong>xxxxxx</strong>xxxxxxxx <strong>xxxxx</strong>xxxxxxxx</span> <span style="font-size:11px;font-family:&quot;Arial&quot;,sans-serif;color:#6f787f"><br /><br /> </span> </p> <img src="https://mandrillapp.com/track/open.php?u=xxxxxxx&amp;id=xxxxx" height="1" width="1" /> </div> <br clear="both" /> </body></html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant