Defect #26442

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

Added by Hal Glenn 7 months ago. Updated 7 months 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 7 months ago

  • Status changed from New to Needs feedback

Please describe more details.

#2 Updated by Hal Glenn 7 months ago

This worked in 3.3, but does not in 3.4

#3 Updated by Toshi MARUYAMA 7 months ago

I cannot reproduce.

#4 Updated by Mischa The Evil 7 months 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 7 months 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 7 months 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 7 months ago

  • Assignee set to Mischa The Evil

I'll take a look at this.

Also available in: Atom PDF