Project

General

Profile

Actions

Defect #39752

closed

<style> tag is not recognized as a tag.

Added by Kazuhiro HOSODA 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

In CommonMark Markdown format, the <style> tag is not recognized as a tag and is displayed as is.

Example 172 of CommonMark Spec is given as an example.

<style
type="text/css">
h1 {color:red;}

p {color:blue;}
</style>
okay


Files

edit.png (6.81 KB) edit.png Kazuhiro HOSODA, 2023-11-30 07:27
preview.png (5.14 KB) preview.png Kazuhiro HOSODA, 2023-11-30 07:27
registered.png (4.45 KB) registered.png Kazuhiro HOSODA, 2023-11-30 07:27
Actions #1

Updated by Holger Just 3 months ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

Raw <style> tags are deliberately excluded in Redmine to avoid potential issues where arbitrary markdown text could alter the user interface of the surrounding page.

If desired, you can use the style attribute on most HTML tags instead where we allow a limited set of CSS rules to be used, e.g.:

<h1 style="color: red">This is a header</h1>
<p style="color: blue;"> This is a paragraph</p>

If you want to permanently alter the rendering of tags within your own Redmine installation, you can also install your own theme where you can use arbitrary CSS rules. See HowTo create a custom Redmine theme for details. To change the rendered markdown text in your custom theme, note that it will always be enclosed in a tag (usually a div or p) with the wiki class. Your custom Redmine theme could thus define something like:

.wiki h1 {color:red;}
.wiki p {color:blue;}
Actions #2

Updated by Kazuhiro HOSODA 3 months ago

Thank you for information. Couldn't find it.

Actions

Also available in: Atom PDF