Skip to content

Commit af2b163

Browse files
authored
Update modules/ROOT/pages/fullpagehtml.adoc
1 parent 3963ab0 commit af2b163

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

modules/ROOT/pages/fullpagehtml.adoc

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,56 @@ tinymce.init({
3737

3838
[WARNING]
3939
====
40-
**Meta tags may be removed by XSS sanitization**
40+
**Certain elements may be removed by XSS sanitization**
41+
By default, {productname} sanitizes HTML content to protect against XSS attacks. Elements outside the HTML5 specification, such as `<script>`, are removed. Standard `<meta>` tags are preserved, but attributes not defined in the HTML5 spec (for example, the RDFa `property` attribute) require explicit configuration to be retained.
4142
42-
By default, {productname} sanitizes HTML content to protect against XSS attacks, which may remove certain meta tags from the full page HTML. If integrators experience issues with meta tags being removed, the following configuration options are available, though not advisable:
43+
If integrators encounter issues with required elements being removed, the following configuration options are available. These options reduce security and should be used with caution:
4344
44-
* `xss_sanitization: false` - Disables DOMPurify.
45-
* `+valid_elements: '*[*]'+` - Allows all elements and attributes.
45+
* `xss_sanitization: false` — Disables DOMPurify and removes all XSS protections.
46+
* `valid_elements: '*[*]'` — Allows all elements and attributes.
47+
* `extended_valid_elements: 'meta[*]'` — Extends the schema to allow additional `<meta>` attributes (for example, RDFa `property`).
4648
47-
See xref:security.adoc#xss_sanitization-option[xss_sanitization option] and xref:content-filtering.adoc#valid_elements[valid_elements option] for more information.
49+
Note that `extended_valid_elements` is *additive*, so all standard elements and attributes remain valid while additional ones are permitted.
4850
49-
**Preserving meta tags (advanced configuration)**
51+
For more details, see xref:security.adoc#xss_sanitization-option[xss_sanitization option] and xref:content-filtering.adoc#valid_elements[valid_elements option].
52+
====
5053

51-
If meta tags are being removed by XSS sanitization, the editor can be configured to preserve them using one of the following approaches, though these options are **not recommended**:
54+
.Example: disabling DOMPurify with `xss_sanitization`
55+
[source,js]
56+
----
57+
tinymce.init({
58+
selector: 'textarea',
59+
plugins: 'fullpagehtml',
60+
toolbar: 'fullpagehtml',
61+
xss_sanitization: false // Disables TinyMCE's built-in XSS sanitization; allows potentially unsafe HTML
62+
});
63+
----
5264

53-
.Example: using `+xss_sanitization+` to disable DOMPurify
65+
.Example: allowing all elements and attributes with `valid_elements`
5466
[source,js]
5567
----
5668
tinymce.init({
5769
selector: 'textarea',
5870
plugins: 'fullpagehtml',
5971
toolbar: 'fullpagehtml',
60-
xss_sanitization: false // Disables DOMPurify, TinyMCE's built-in XSS sanitization which allows potentially unsafe HTML content to be inserted
72+
valid_elements: '*[*]' // Permits all elements and attributes; use with extreme caution
6173
});
6274
----
6375

64-
.Example: using `+valid_elements+` to allow all elements and attributes
76+
.Example: extending `<meta>` support with `extended_valid_elements`
6577
[source,js]
6678
----
6779
tinymce.init({
6880
selector: 'textarea',
6981
plugins: 'fullpagehtml',
7082
toolbar: 'fullpagehtml',
71-
valid_elements: '*[*]' // Allows all elements and attributes - use with caution
83+
extended_valid_elements: 'meta[*]' // Permits additional <meta> attributes (such as RDFa property)
7284
});
7385
----
86+
87+
[NOTE]
88+
====
89+
Support for the RDFa `property` attribute on `<meta>` elements is planned for inclusion in the default {productname} schema in version 8.2. If you require this attribute now, use `extended_valid_elements` as shown above.
7490
====
7591

7692
[WARNING]

0 commit comments

Comments
 (0)