Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Dec 2015 at 08:23 UTC
Updated:
31 Dec 2015 at 08:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
joelpittetThanks @Jeff Burnz for finding this. Here's a patch to fix it.
Comment #3
joelpittetWe will need to add a regression test which should be fairly straight forward. Just check for existence for a tag on that page when there are comments on a topic.
Comment #4
joelpittetAdded a regression test.
Comment #6
berdirWhy #prefix instead of two #markup elements?
TwigExtension has a safeJoin(). I've wondered before if we shouldn't offer something similar as an API, e.g. on markup? I know that I've had a use case for this, but I can't remember where.
It's not very nice, but it would allow us to fix this without changing anything about the structure..
Comment #7
joelpittet@Berdir I just made that choice because it was being used as a prefix, IMO. I want that safeJoin thing too but it seems like some think it may be a security risk from what I gather, the discussion
#2501975: Determine how to update code that currently joins strings in SafeMarkup::set() and #2554073: Allow #markup to be an array of strings and join them safely
And somewhat related:
#2579091: Make safe_join Twig filter return a Markup object
With
#prefixor another#markupwe are using xss admin filtering the results in more or less the same way. (#prefixdoesn't check for#plain_textor#allowed_tags.Comment #8
mikeker commentedProbably not in-scope for this issue, but there looks like a lot of HTML being generated in
template_preprocess_forums(). Should this template be refactored so that HTML can be overwritten by other themes?Comment #9
joelpittet@mikeker I was thinking the same thing;) Maybe we can do that in 8.1.x, not sure how we are going to wrangle markup changes yet. Would you mind opening up an issue for that so we can tackle that. Even just moving the table markup to a template would be way more useful for themers than the #type table, IMO
@Berdir if you prefer two #markup for some reason I'll change it if that makes it RTBCable. I'm not concerned either way.
Comment #10
mikeker commentedI'm marking this as a dup of #2488886: Forum - "new replies" message is escaped as there is a much longer thread in that issue discussing this change. That issue has been stalled since May so hopefully new eyes will get it moving again. Feel free to reverse that if you feel strongly.
Comment #11
joelpittetSeems like a good call, that's an older issue. thanks for triaging these @mikeker
Comment #12
Jeff Burnz commentedWow, thanks for finding that, I looked and looked as well, cheers mikeker.