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: 70
Joined: 12 Oct 2017, 11:38

Unable to parse <html xmlns:>

Post 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
Attachments
Capture.JPG
Capture.JPG (144.28 KiB) Viewed 7987 times
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Unable to parse <html xmlns:>

Post 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
sintaq
Posts: 70
Joined: 12 Oct 2017, 11:38

Re: Unable to parse <html xmlns:>

Post by sintaq »

Attached as requested. Thanks
Attachments
raw_msg shared.txt
(5.3 KiB) Downloaded 472 times
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Unable to parse <html xmlns:>

Post 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
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Unable to parse <html xmlns:>

Post 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
sintaq
Posts: 70
Joined: 12 Oct 2017, 11:38

Re: Unable to parse <html xmlns:>

Post by sintaq »

Applying the fixes solve the issue.

Thanks SL-Gundam
Post Reply