From 8f06255213e16f64d8480bd8ff35e078411761df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Fri, 8 Feb 2019 10:21:21 +0100 Subject: [PATCH] Escape HTML characters (#13744) --- packages/autop/src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/autop/src/index.js b/packages/autop/src/index.js index e3b9fbca887b7..916f56a4be5f2 100644 --- a/packages/autop/src/index.js +++ b/packages/autop/src/index.js @@ -112,7 +112,7 @@ function replaceInHtmlTags( haystack, replacePairs ) { * * A group of regex replaces used to identify text formatted with newlines and * replace double line-breaks with HTML paragraph tags. The remaining line- - * breaks after conversion become <
> tags, unless br is set to 'false'. + * breaks after conversion become `
` tags, unless br is set to 'false'. * * @param {string} text The text which has to be formatted. * @param {boolean} br Optional. If set, will convert all remaining line- @@ -278,10 +278,10 @@ export function autop( text, br = true ) { } /** - * Replaces

tags with two line breaks. "Opposite" of autop(). + * Replaces `

` tags with two line breaks. "Opposite" of autop(). * - * Replaces

tags with two line breaks except where the

has attributes. - * Unifies whitespace. Indents

  • ,
    and
    for better readability. + * Replaces `

    ` tags with two line breaks except where the `

    ` has attributes. + * Unifies whitespace. Indents `

  • `, `
    ` and `
    ` for better readability. * * @param {string} html The content from the editor. * @return {string} The content with stripped paragraph tags.