Skip to content

Commit

Permalink
Escape HTML characters (#13744)
Browse files Browse the repository at this point in the history
  • Loading branch information
nosolosw authored Feb 8, 2019
1 parent 9632d34 commit ed4f8c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/autop/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<br />> tags, unless br is set to 'false'.
* breaks after conversion become `<br />` 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-
Expand Down Expand Up @@ -278,10 +278,10 @@ export function autop( text, br = true ) {
}

/**
* Replaces <p> tags with two line breaks. "Opposite" of autop().
* Replaces `<p>` tags with two line breaks. "Opposite" of autop().
*
* Replaces <p> tags with two line breaks except where the <p> has attributes.
* Unifies whitespace. Indents <li>, <dt> and <dd> for better readability.
* Replaces `<p>` tags with two line breaks except where the `<p>` has attributes.
* Unifies whitespace. Indents `<li>`, `<dt>` and `<dd>` for better readability.
*
* @param {string} html The content from the editor.
* @return {string} The content with stripped paragraph tags.
Expand Down

0 comments on commit ed4f8c8

Please sign in to comment.