yoastseo
Version:
Yoast client-side content analysis
18 lines (17 loc) • 513 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
/**
* Replaces line break tag that contains an attribute with paragraph tag.
* Line break tags with attribute aren't properly sanitized using wordpress `autop` function.
*
* @param {string} text The text to sanitize.
*
* @returns {string} The sanitized text.
*/
function _default(text) {
return text.replace(/<br.*?>\s*<.*?br.*?>/gm, "</p><p>");
}
//# sourceMappingURL=sanitizeLineBreakTag.js.map