Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape HTML characters #13744

Merged
merged 1 commit into from
Feb 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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