Active
Project:
Drupal core
Version:
main
Component:
mail system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Sep 2015 at 13:56 UTC
Updated:
18 Aug 2020 at 00:49 UTC
Jump to comment: Most recent
Comments
Comment #2
berdirNote that I added a temporary change to change the expectations, so the link won't be failing anymore.
Comment #3
stefan.r commentedWe have another version which is MailFormatHelper::htmlToText, but a mail subject doesn't need such fanciness, at least not all the newlines... So this would be yet another output formatter.
If we're rendering HTML to plain text, the input value would just be
<tag>if we wanted to convert that to<tag>in a subject - are we sure this needs to be fixed?Comment #4
xjm#2575599: Remove !placeholder in ContactPersonalTest and Drupal\migrate\Plugin\migrate\id_map\Sql (and before it #2571695: Remove !placeholder and unsafe string return from SafeMarkup::format()) updated the ContactPersonalTest thusly:
...and then afterward added a
PlainTextOutput::renderFromHtml()for the subject with no impact on the test result either way. @alexpott said this is the issue that will add test coverage for HTML for subjects generally.Comment #5
catchFor me #3 is the answer to this issue - if you want literal HTML tags add them to the input string as HTML entities.
Comment #12
adamps commentedOK, but who is responsible for doing it? For example there are configurable email titles on the page /admin/config/people/accounts. A < symbol in a title without a space after it causes the rest of the title to be lost.
Should we add code that escapes entities to counteract the code that strips them?
Should we add end-user visible documentation on this page explaining about tag stripping and how to work around it. The user is entering plain text so it is counter-intuitive that they have to use HTML encoding. Even worse, in order to get a literal HTML tag through, it seems that you need to double-encode it:
&lt;
Both of these options seem unattractive.
Comment #15
jungleTagging "Bug Smash Initiative" and changing the target version to the current dev branch.