Defect #13284
closed
Should not try to strip HTML tags from text/plain MIME part
Added by Alex Shulgin over 11 years ago.
Updated almost 6 years ago.
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
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
What's your Redmine version please?
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
- 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.
Also available in: Atom
PDF