<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php

namespace WordfenceLS\Text;

/**
 * Represents text that is already JavaScript-safe and should not be encoded again.
 * @package Wordfence2FA\Text
 */
class Model_JavaScript {
	private $_javaScript;
	
	/**
	 * Returns a string escaped for use in JavaScript. This is almost identical in behavior to esc_js except that
	 * we don't call _wp_specialchars and keep \r rather than stripping it.
	 * 
	 * @param string|Model_JavaScript $content
	 * @return string
	 */
	public static function esc_js($content) {
		if (is_object($content) && ($content instanceof Model_HTML)) {
			return (string) $content;
		}
		
		$safe_text = wp_check_invalid_utf8($content);
		$safe_text = preg_replace('/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes($safe_text));
		$safe_text = str_replace("\r", '\\