Page 1 of 1

Unable to parse <html xmlns:>

Posted: 11 Jul 2019, 15:15
by sintaq
Hi all,

Im trying to configure EmailReporting and it seems like not able to parse <html xmlns:> and getting the entire chunk of the tag into issues'description.

But when try to send via web outlook, the result is as expected and satisfactory

Refer attached

mantis 2.21.1
emailreporting 0.11.0-DEV
send from outlook 2010 client

Any idea? Thanks

Re: Unable to parse <html xmlns:>

Posted: 11 Jul 2019, 19:07
by SL-Gundam
Please enable debug mode and reproduce the issue

It will create a raw_msg_ file for the processed email

Please send the raw_msg_ file to me so that i can debug it

Re: Unable to parse <html xmlns:>

Posted: 12 Jul 2019, 01:38
by sintaq
Attached as requested. Thanks

Re: Unable to parse <html xmlns:>

Posted: 12 Jul 2019, 16:55
by SL-Gundam
I checked the code

Markdownify which is used to convert the html to markdown is able to proces xmlns. It just has never been tested with this many variations of it

For example. It is able to process this one

Code: Select all

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
Yours is a lot larger. Will have the code line by line

Re: Unable to parse <html xmlns:>

Posted: 12 Jul 2019, 18:14
by SL-Gundam
I think we have a fix

The issue was that the xmlns attributes names in your email sometimes contained numbers which caused Markdownify to recognize it as text instead of an html tag

Please test it

https://github.com/mantisbt-plugins/Ema ... 6c68669671

Re: Unable to parse <html xmlns:>

Posted: 13 Jul 2019, 03:41
by sintaq
Applying the fixes solve the issue.

Thanks SL-Gundam