Bug #13147
closedCan't underline in forum post
0%
Description
I just posted a list with underlined items to the CAC team forum (screenshot attached) that rendered the underline in the preview but then just showed <span> underline tags once published. Not sure if that's the case with italics too, but bold seemed to come through fine. I've already gone back and edited the original post so it's more readable.
Files
Updated by Boone Gorges over 4 years ago
- Category name set to Group Forums
- Assignee changed from Boone Gorges to Raymond Hoh
- Target version set to 1.17.1
Ray, could you have a look? I don't know whether the problem is the markup (should it use em
instead?) or the allowed tags.
Updated by Raymond Hoh over 4 years ago
- File 2020-08-04_205201.png 2020-08-04_205201.png added
Colin, how did you add the <span style="text-decoration:underline">
tag? There is no button to underline in the visual editor or code editor. Did you write it yourself in the code editor? Or did you press CTRL+U in the visual editor?
Technically, bbPress does not allow the <span>
element to be rendered for regular users. Only super administrators can bypass this, but Colin's account isn't an administrator, so the underline shouldn't have even shown in the live preview.
However, if you used the CTRL+U approach, you would see the underline in the textarea, but not in the live preview. See attached screenshot. Maybe this is what you meant, Colin?
should it use em instead?
<em>
is already used for italics by the bbPress I
button.
If we want to allow underlining (and also bring back the underline button), we would have to enable the <span> element and also the style
attribute in bbPress. Adding the style
attribute would allow users to write any inline styles in their content. Is this something we want to allow?
Or we could write our own custom underline button with the following markup -- <span class="underline">
and enable the class
attribute. This would allow underlining and we wouldn't have to open up inline styles.
Updated by Colin McDonald over 4 years ago
Sorry everyone, I used CTRL+U and the underlines came through in the editor, but they must not have in the preview, and then it was too late once I hit publish to know the spans would come through. I don't think it's worthwhile to enable spans in all cases just to get underlining back (I don't often use it myself, but must have just been feeling adventurous that day...).
Updated by Raymond Hoh over 4 years ago
- Status changed from New to Staged for Production Release
(I don't often use it myself, but must have just been feeling adventurous that day...)
I was feeling adventurous so I decided to add the Underline button :)
The Underline button uses the following markup: <span class="bbp-underline">Test</span>
instead of <span style="text-decoration:underline">Test</span>
.
The button is available in both the Visual Editor or the Text Editor.
Commit - https://github.com/cuny-academic-commons/cac/commit/065efa6b19e4aa3d5730509a31eb4580fc52f382
Updated by Boone Gorges over 4 years ago
- Status changed from Staged for Production Release to Resolved