aboutsummaryrefslogblamecommitdiffstats
path: root/Zotlabs/Lib/Text.php
blob: f593f9dd66b74a3c32c1edfd8a0e8e5e7504b7ef (plain) (tree)



















                                                                                        
                                                                             


         
<?php

namespace Zotlabs\Lib;

class Text {

	/**
	 * use this on "body" or "content" input where angle chars shouldn't be removed,
	 * and allow them to be safely displayed.
	 *
	 * @param string $string
	 *
	 * @return string
	 */

	public static function escape_tags(string $string): string {
		if (!$string) {
			return EMPTY_STR;
		}

		return htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false);
	}

}