From 6ffe31a83c37217189ebb2182b8ceeeb85fe4c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 7 Feb 2019 18:27:24 +0100 Subject: [PATCH] Escape HTML characters --- 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 e3b9fbca887b7f..916f56a4be5f21 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.