Defect #13284
closedShould not try to strip HTML tags from text/plain MIME part
0%
Description
Redmine currently tries to strip HTML tags from the message part even if it's not an HTML part. This results in blocks of text like the following being stripped altogether (after the first angle bracket):
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
...
Attached patch fixes this.
Files
Related issues
Updated by Alex Shulgin almost 12 years ago
Alex Shulgin wrote:
Redmine currently tries to strip HTML tags from the message part even if it's not an HTML part. This results in blocks of text like the following being stripped altogether (after the first angle bracket):
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
...
Actually, with the quoted block as above it only removes the first unclosed 'tag': "<1024". However, if there are quote symbols (double or single) anywhere in the line after the unclosed tag, it removes all the content between the start of the unclosed symbol and the last quote symbol.
I'm now wondering if this should be seen as a bug of strip_tags method in Rails. Shouldn't it just ignore invalid markup instead of removing it?
--
Alex
Updated by Etienne Massip almost 12 years ago
What's your Redmine version please?
Updated by Alex Shulgin almost 12 years ago
Etienne Massip wrote:
What's your Redmine version please?
Mine is 2.2-stable. The code in trunk is identical, so it must be doing the same (dumb) thing.
--
Alex
Updated by Go MAEDA almost 6 years ago
- Status changed from New to Closed
- Resolution set to Fixed
Fixed by #16962. Redmine 3.1.0 and later don't strip tag-like strings for text parts.
Updated by Go MAEDA almost 6 years ago
- Related to Feature #16962: Better handle html-only emails added