var/www/html/servotec-doerpen/wp-includes/js | uid:33
wp-sanitize.js [X]
/**
 * @output wp-includes/js/wp-sanitize.js
 */

/* eslint-env es6 */

( function () {

	window.wp = window.wp || {};

	/**
	 * wp.sanitize
	 *
	 * Helper functions to sanitize strings.
	 */
	wp.sanitize = {

		/**
		 * Strip HTML tags.
		 *
		 * @param {string} text - Text to strip the HTML tags from.
		 *
		 * @return {string} Stripped text.
		 */
		stripTags: function( text ) {
			if ( 'string' !== typeof text ) {
				return '';
			}

			const domParser = new DOMParser();
			const htmlDocument = domParser.parseFromString(
				text,
				'text/html'
			);

			/*
			 * The following self-assignment appears to be a no-op, but it isn't.
			 * It enforces the escaping. Reading the `innerText` property decodes
			 * character references, returning a raw string. When written, however,
			 * the text is re-escaped to ensure that the rendered text replicates
			 * what it's given.
			 *
			 * See <https://github.com/WordPress/wordpress-develop/pull/10536#discussion_r2550615378>.
			 */
			htmlDocument.body.innerText = htmlDocument.body.innerText;

			// Return the text with stripped tags.
			return htmlDocument.body.innerHTML;
		},

		/**
		 * Strip HTML tags and convert HTML entities.
		 *
		 * @param {string} text - Text to strip tags and convert HTML entities.
		 *
		 * @return {string} Sanitized text.
		 */
		stripTagsAndEncodeText: function( text ) {
			let _text = wp.sanitize.stripTags( text ),
				textarea = document.createElement( 'textarea' );

			try {
				textarea.textContent = _text;
				_text = wp.sanitize.stripTags( textarea.value );
			} catch ( er ) {}

			return _text;
		}
	};
}() );
codemirror/-O R D
crop/-O R D
dist/-O R D
imgareaselect/-O R D
jcrop/-O R D
jquery/-O R D
mediaelement/-O R D
plupload/-O R D
swfupload/-O R D
thickbox/-O R D
tinymce/-O R D
autosave.min.js5.7KV E R D
clipboard.js26.2KV E R D
clipboard.min.js8.8KV E R D
colorpicker.js28.4KV E R D
colorpicker.min.js16.1KV E R D
customize-preview-nav-menus.js14.7KV E R D
customize-preview-nav-menus.min.js4.9KV E R D
customize-views.min.js2.5KV E R D
heartbeat.js23.5KV E R D
heartbeat.min.js5.8KV E R D
imagesloaded.min.js5.4KV E R D
masonry.min.js23.6KV E R D
mce-view.js25.2KV E R D
media-audiovideo.js24.1KV E R D
media-audiovideo.min.js11.8KV E R D
media-grid.js26.1KV E R D
media-grid.min.js13KV E R D
media-models.min.js13KV E R D
media-views.js266.5KV E R D
media-views.min.js108.1KV E R D
quicktags.js22.1KV E R D
quicktags.min.js10.9KV E R D
tw-sack.min.js3.2KV E R D
twemoji.js36.3KV E R D
twemoji.min.js19.4KV E R D
underscore.min.js18.6KV E R D
wp-ajax-response.js3.8KV E R D
wp-ajax-response.min.js2.5KV E R D
wp-emoji-loader.js12.9KV E R D
wp-emoji-loader.min.js2.8KV E R D
wp-emoji-release.min.js22.2KV E R D
wp-emoji.js8.6KV E R D
wp-emoji.min.js2.8KV E R D
wp-list-revisions.js970V E R D
wp-list-revisions.min.js597V E R D
wp-lists.js24.7KV E R D
wp-lists.min.js7.3KV E R D
wp-sanitize.js1.6KV E R D
wp-util.min.js1.4KV E R D
wpdialog.js569V E R D
wpdialog.min.js281V E R D
wplink.min.js11.1KV E R D
zxcvbn-async.js821V E R D
zxcvbn-async.min.js351V E R D
zxcvbn.min.js803KV E R D