From 8019660de89fd82b3b401f1498cc75baab26ac50 Mon Sep 17 00:00:00 2001 From: Farzad Hayat Date: Tue, 2 Apr 2024 11:41:38 +1000 Subject: [PATCH] DOC-2354: Add TINY-10682 release note entry (#3192) * DOC-2354: Add TINY-10682 release note entry * Improve CCFR and add example of before/after fix. * Added an example to TINY-10789 * Apply suggestions from Shan's code review Co-authored-by: shanmen-tiny * Add live demo examples for TINY-10789 * Add live demo example for TINY-10682 --------- Co-authored-by: shanmen-tiny --- .../live-demos/tiny-10682-after/index.html | 9 ++++++ .../live-demos/tiny-10682-after/index.js | 8 +++++ .../live-demos/tiny-10682-before/index.html | 9 ++++++ .../live-demos/tiny-10682-before/index.js | 8 +++++ .../live-demos/tiny-10682-initial/index.html | 9 ++++++ .../live-demos/tiny-10682-initial/index.js | 8 +++++ .../live-demos/tiny-10789-after/index.html | 9 ++++++ .../live-demos/tiny-10789-after/index.js | 8 +++++ .../live-demos/tiny-10789-before/index.html | 9 ++++++ .../live-demos/tiny-10789-before/index.js | 8 +++++ modules/ROOT/pages/7.0.1-release-notes.adoc | 31 +++++++++++++++++-- 11 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-after/index.html create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-after/index.js create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-before/index.html create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-before/index.js create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-initial/index.html create mode 100644 modules/ROOT/examples/live-demos/tiny-10682-initial/index.js create mode 100644 modules/ROOT/examples/live-demos/tiny-10789-after/index.html create mode 100644 modules/ROOT/examples/live-demos/tiny-10789-after/index.js create mode 100644 modules/ROOT/examples/live-demos/tiny-10789-before/index.html create mode 100644 modules/ROOT/examples/live-demos/tiny-10789-before/index.js diff --git a/modules/ROOT/examples/live-demos/tiny-10682-after/index.html b/modules/ROOT/examples/live-demos/tiny-10682-after/index.html new file mode 100644 index 0000000000..75b238b50b --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-after/index.html @@ -0,0 +1,9 @@ +
+
+

Table of Contents

+ +
+

My Heading

+
diff --git a/modules/ROOT/examples/live-demos/tiny-10682-after/index.js b/modules/ROOT/examples/live-demos/tiny-10682-after/index.js new file mode 100644 index 0000000000..3d68c5fcc6 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-after/index.js @@ -0,0 +1,8 @@ +tinymce.init({ + selector: 'div#tiny-10682-after', + plugins: 'tableofcontents', + menubar: false, + inline: true, + toolbar: false, + readonly: true +}); \ No newline at end of file diff --git a/modules/ROOT/examples/live-demos/tiny-10682-before/index.html b/modules/ROOT/examples/live-demos/tiny-10682-before/index.html new file mode 100644 index 0000000000..20b95df7e3 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-before/index.html @@ -0,0 +1,9 @@ +
+
+

Table of <em>Contents</em>

+ +
+

My Heading

+
diff --git a/modules/ROOT/examples/live-demos/tiny-10682-before/index.js b/modules/ROOT/examples/live-demos/tiny-10682-before/index.js new file mode 100644 index 0000000000..a25d8b5d80 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-before/index.js @@ -0,0 +1,8 @@ +tinymce.init({ + selector: 'div#tiny-10682-before', + plugins: 'tableofcontents', + menubar: false, + inline: true, + toolbar: false, + readonly: true +}); \ No newline at end of file diff --git a/modules/ROOT/examples/live-demos/tiny-10682-initial/index.html b/modules/ROOT/examples/live-demos/tiny-10682-initial/index.html new file mode 100644 index 0000000000..75b238b50b --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-initial/index.html @@ -0,0 +1,9 @@ +
+
+

Table of Contents

+ +
+

My Heading

+
diff --git a/modules/ROOT/examples/live-demos/tiny-10682-initial/index.js b/modules/ROOT/examples/live-demos/tiny-10682-initial/index.js new file mode 100644 index 0000000000..01e33b5edb --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10682-initial/index.js @@ -0,0 +1,8 @@ +tinymce.init({ + selector: 'div#tiny-10682-initial', + plugins: 'tableofcontents', + menubar: false, + inline: true, + toolbar: false, + readonly: true +}); \ No newline at end of file diff --git a/modules/ROOT/examples/live-demos/tiny-10789-after/index.html b/modules/ROOT/examples/live-demos/tiny-10789-after/index.html new file mode 100644 index 0000000000..0857f1bd4b --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10789-after/index.html @@ -0,0 +1,9 @@ +
+
+

Table of Contents

+ +
+

My <em>Heading</em>

+
diff --git a/modules/ROOT/examples/live-demos/tiny-10789-after/index.js b/modules/ROOT/examples/live-demos/tiny-10789-after/index.js new file mode 100644 index 0000000000..0888f52699 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10789-after/index.js @@ -0,0 +1,8 @@ +tinymce.init({ + selector: 'div#tiny-10789-after', + plugins: 'tableofcontents', + menubar: false, + inline: true, + toolbar: false, + readonly: true +}); \ No newline at end of file diff --git a/modules/ROOT/examples/live-demos/tiny-10789-before/index.html b/modules/ROOT/examples/live-demos/tiny-10789-before/index.html new file mode 100644 index 0000000000..1d99c7c8c6 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10789-before/index.html @@ -0,0 +1,9 @@ +
+
+

Table of Contents

+ +
+

My <em>Heading</em>

+
diff --git a/modules/ROOT/examples/live-demos/tiny-10789-before/index.js b/modules/ROOT/examples/live-demos/tiny-10789-before/index.js new file mode 100644 index 0000000000..ee7f031245 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tiny-10789-before/index.js @@ -0,0 +1,8 @@ +tinymce.init({ + selector: 'div#tiny-10789-before', + plugins: 'tableofcontents', + menubar: false, + inline: true, + toolbar: false, + readonly: true +}); \ No newline at end of file diff --git a/modules/ROOT/pages/7.0.1-release-notes.adoc b/modules/ROOT/pages/7.0.1-release-notes.adoc index d83509c8e1..23d89cf59d 100644 --- a/modules/ROOT/pages/7.0.1-release-notes.adoc +++ b/modules/ROOT/pages/7.0.1-release-notes.adoc @@ -93,13 +93,40 @@ The {productname} {release-version} release includes an accompanying release of This **Table of Contents** release includes the following fixes. -==== Encode header title for literal display in table of contents. +==== Encoding header of Table of Contents causing HTML source to be revealed on refresh. +// #TINY-10682 + +Previously in {productname}, the **Table of Contents** (ToC) header encoding caused special characters to be incorrectly displayed as code instead of their HTML representation. + +To address this issue, the HTML encoding has been removed. As a result, the ToC header now renders correctly as HTML even after refreshing, displaying as intended. + +For example, if the **Table of Contents** (ToC) header contained the following content with "_Contents_" emphasized as follows: + +liveDemo::tiny-10682-initial[] + +Upon refreshing the ToC, the header would change to display the HTML tags literally, exposing the underlying HTML: + +liveDemo::tiny-10682-before[] + +Now, the header maintains the intended HTML rendering even after refreshing: + +liveDemo::tiny-10682-after[] + +==== Encode header title for literal display in Table of Contents. // #TINY-10789 -Previously in {productname}, during Table of Contents (ToC) generation, heading elements containing HTML tags such as `` for italics were incorrectly rendered within the ToC itself. +Previously in {productname}, during Table of Contents (ToC) generation, heading elements containing HTML tags such as `` for italics were incorrectly rendered within the ToC itself. {productname} {release-version} addresses this issue by encoding the heading element during ToC generation. This ensures that any HTML tags present within the heading element are treated as plain text and displayed literally. +For example, if your document contained a heading element with HTML tags as string in the heading content, the ToC would previously render the heading element as follows: + +liveDemo::tiny-10789-before[] + +Now, the ToC maintains the HTML tags within the heading element as plain text, matching the heading element itself: + +liveDemo::tiny-10789-after[] + For information on the **Table of Contents** plugin, see: xref:tableofcontents.adoc[Table of Contents].