Defect #26442

CSS formating classes like p(box). prepended with wiki-class-

Added by Hal Glenn over 1 year ago. Updated about 1 month ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:Mischa The Evil% Done:

0%

Category:Text formatting
Target version:-
Resolution: Affected version:3.4.1

Description

This worked in the 3.3 trunk, updated to 3.4 and box's are no longer there but text is still displayed.

This method of text formatting was taken from the "Mastering Redmine Book" page 322.

Capture.PNG (36.7 KB) Hal Glenn, 2017-07-14 19:03

source.png (2.49 KB) Toshi MARUYAMA, 2017-07-14 19:37

html.png (35.5 KB) Toshi MARUYAMA, 2017-07-14 19:37

History

#1 Updated by Toshi MARUYAMA over 1 year ago

  • Status changed from New to Needs feedback

Please describe more details.

#2 Updated by Hal Glenn over 1 year ago

This worked in 3.3, but does not in 3.4

#3 Updated by Toshi MARUYAMA over 1 year ago

I cannot reproduce.

#4 Updated by Mischa The Evil over 1 year ago

Toshi, I can confirm it. As is also visible in the screenshot from the referenced book, before r16502 it was possible to reuse the core CSS classes (like box, conflict, etc.) in the content. This is not possible any longer after r16502, as these classes get wiki-class- prefixed as visible in your screenshot.

#5 Updated by Jean-Philippe Lang over 1 year ago

  • Subject changed from Calling CSS formating classes like p(box). do not work in 3.4 to CSS formating classes like p(box). prepended with wiki-class-

Mischa The Evil wrote:

Toshi, I can confirm it. As is also visible in the screenshot from the referenced book, before r16502 it was possible to reuse the core CSS classes (like box, conflict, etc.) in the content. This is not possible any longer after r16502, as these classes get wiki-class- prefixed as visible in your screenshot.

Yes, the change was made on purpose in order to prevent arbitrary CSS classes from being used in formatted text. It was reported as a vulnerability and fixed in 3.4.

All user entered CSS classes are now prefixed with wiki-class- and ids with wiki-id-. We can still add support for some of them in the default stylesheet. It will be better to have dedicated CSS classes for formatted text instead of using those of the core that can change.

Can we make a list of usefull classes that should be made available for formatted text?

#6 Updated by Hal Glenn over 1 year ago

For what is is worth, I only am aware or use the two that the book mentions: p(box) and p(conflict). Digging into the CSS to understand what options we could have for advanced text formatting and display is not something we have done. The addition of having these two has enhanced the clarity of our document / issue presentation so having them is nice. Possibly there are others as well that could be useful but I have not seen any documentation on what they may be, and I do not have sufficient base knowledge of where to go looking for them or the need.

#7 Updated by Mischa The Evil over 1 year ago

  • Assignee set to Mischa The Evil

I'll take a look at this.

#8 Updated by Hal Glenn 9 months ago

Is there anything I can do to help support this issue? I'm assuming others have used this feature in the past, especially being that it was published in the Mastering Redmine book. p(conflict) and p(box) are currently the only ones I'm familiar with.

I do like Jean-Philippe's comment about having a published list that we (users) can reference. If it was published it would greatly enhance peoples ability to create rich content in redmine. Being that there is no new CSS, it is just using vetted code, there is little maintenance overhead added to having these methods available to the users.

#9 Updated by Matt Bertapelle 4 months ago

Is there an update to this? Our organization has metric-ton of wikis and tickets in Redmine that use p(conflict) and p(box), as others have said, because they're really nice and convenient. Looking to update soon, too, and hoping that we can just jump to 3.4.7 with this function/equivalent restored ;-)

#10 Updated by Hal Glenn about 1 month ago

Is there a way to patch issues with the current system to get the site wide CSS p(box) and p(conflict) to work again with wiki-class prefixes added to them? Would it be appropriate to add that to our current theme's style sheet to regain support for this very useful formatting feature again?

Also available in: Atom PDF