Skip to content

Commit

Permalink
Escape HTML characters
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Feb 8, 2019
1 parent 9d51c3e commit 6ffe31a
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 6ffe31a

Please sign in to comment.