You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/7.8.0-release-notes.adoc
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,54 @@ The {productname} {release-version} release includes an accompanying release of
69
69
70
70
For information on the **<Premium plugin name 1>** plugin, see: xref:<plugincode>.adoc[<Premium plugin name 1>].
71
71
72
+
=== Math
73
+
74
+
The {productname} {release-version} release includes an accompanying release of the **Math** premium plugin.
75
+
76
+
**Math** includes the following fix.
77
+
78
+
==== New `extended_mathml_attributes` and `extended_mathml_elements` options.
79
+
// #TINY-11756
80
+
81
+
== New options for customizing allowed MathML elements and attributes
82
+
83
+
To improve flexibility when working with MathML content, especially in cases where new attributes or elements are not yet supported by DOMPurify, two new configuration options have been introduced: xref:math.adoc#extended-mathml-elements[extended_mathml_elements] and xref:math.adoc#extended-mathml-attributes[extended_mathml_attributes].
84
+
85
+
Prior to {release-version}, MathML elements and attributes could be configured informally, but were not officially supported. With enhanced security measures introduced in {productname} {release-version}, MathML content is now filtered separately from HTML using DOMPurify, and any unsupported elements or attributes are stripped from the editor content. This change increased security but removed the ability to allow certain MathML-specific content.
86
+
87
+
The new options allow users to define lists of MathML elements and attributes that should be preserved, even if DOMPurify does not currently recognize them. This enables quicker user-side updates in response to evolving MathML specifications without disabling sanitization or waiting for upstream changes.
88
+
89
+
**`+extended_mathml_elements+`**: allows a list of additional MathML elements to be preserved.
90
+
**`+extended_mathml_attributes+`**: allows a list of additional MathML attributes to be preserved.
91
+
92
+
These options apply only within MathML contexts and do not affect general HTML content. They enable use cases such as preserving `+<mn>+` elements and attributes like `linebreak` in MathML expressions.
93
+
94
+
.Example of MathML with preserved elements and attributes
95
+
[source,js]
96
+
----
97
+
tinymce.init({
98
+
selector: "textarea",
99
+
extended_mathml_elements: [ "mn" ],
100
+
extended_mathml_attributes: [ "linebreak" ]
101
+
});
102
+
----
103
+
104
+
.Example of MathML with preserved elements and attributes
105
+
[source,html]
106
+
----
107
+
<p>
108
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
109
+
<mrow><mn>0.196</mn></mrow>
110
+
<mspace linebreak="newline"></mspace>
111
+
<mrow><mo>=</mo></mrow>
112
+
<mspace linebreak="newline"></mspace>
113
+
<mrow><mn>0.196</mn></mrow>
114
+
</math>
115
+
</p>
116
+
----
117
+
118
+
For information on the **Math** premium plugin, see: xref:math.adoc[Math].
This option allows a specific list of additional MathML attributes to be preserved in the editor content, even if they are not included in the default DOMPurify allowlist. This setting only affects attributes used within MathML markup and has no effect on general HTML content.
This option allows a specific list of additional MathML elements to be preserved in the editor content, even if they are not included in the default DOMPurify allowlist. This setting only affects elements used within MathML markup and has no effect on general HTML content.
0 commit comments