<?php
$str = "This is some <b>bold</b> text.";
$str = "你好 世界 <b>bold</b> text.";
echo htmlspecialchars($str);