Unable to parse <html xmlns:>

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
sintaq
Posts: 6
Joined: Oct 12, 2017 6:38 am

Unable to parse <html xmlns:>

Post by sintaq » Jul 11, 2019 10:15 am

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
Attachments
Capture.JPG
Capture.JPG (144.28 KiB) Viewed 401 times

SL-Gundam
Posts: 575
Joined: Jul 06, 2011 9:17 am

Re: Unable to parse <html xmlns:>

Post by SL-Gundam » Jul 11, 2019 2:07 pm

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

sintaq
Posts: 6
Joined: Oct 12, 2017 6:38 am

Re: Unable to parse <html xmlns:>

Post by sintaq » Jul 11, 2019 8:38 pm

Attached as requested. Thanks
Attachments
raw_msg shared.txt
(5.3 KiB) Downloaded 12 times

SL-Gundam
Posts: 575
Joined: Jul 06, 2011 9:17 am

Re: Unable to parse <html xmlns:>

Post by SL-Gundam » Jul 12, 2019 11:55 am

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

SL-Gundam
Posts: 575
Joined: Jul 06, 2011 9:17 am

Re: Unable to parse <html xmlns:>

Post by SL-Gundam » Jul 12, 2019 1:14 pm

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

sintaq
Posts: 6
Joined: Oct 12, 2017 6:38 am

Re: Unable to parse <html xmlns:>

Post by sintaq » Jul 12, 2019 10:41 pm

Applying the fixes solve the issue.

Thanks SL-Gundam

Post Reply