Skip to main content
Topic: Notification email shows "bad" html (Read 1300 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Notification email shows "bad" html

The forum allows users to subscribe to email notifications, so that they get a message when a new topic or reply is posted.

I found a bug when the text contains characters that result in HTML entities.

Example:

Code: [Select]
[color=blue]> - greater than (>)[/color]


fails to render correctly, i.e. the text in the resulting email shows ">" instead of ">".

Without the color attribute it renders correctly:

Code: [Select]
> - greater than (>)

This makes me believe the BBCode rendering to HTML is incomplete to say the least. Anything I could do about this?

Re: Notification email shows "bad" html

Reply #1

hmm...
The issue could "simply" be that the greater sign is firstly converted to > when the bbcode is interpreted, and then the & is encoded too into & when converted to HTML.
Here probably @Spuds would have more knowledge than me of the internals of these conversions...
Bugs creator.
Features destroyer.
Template killer.

Re: Notification email shows "bad" html

Reply #2

Well the BBC to HTML should be part of the core, its the BBC parser AFAIK.

Seems like the HTML to MD which is what the Email is sent out as (give or take) may need to convert any danging &gt and associated cruf to plain text.   TBH I have not looked at the code in quite some time :(

Re: Notification email shows "bad" html

Reply #3

Hey Spuds!
How is it?

At least you have looked at it more than me! xD
Bugs creator.
Features destroyer.
Template killer.