I want to allow the use of tags: <b>, <i>, <kbd> и т.д. .
That's why in the code I use the strip_tags() function, but it removes html, php tags . In turn, htmlspecialchars() simply replaces with the appropriate characters, which means that if I later use them htmlspecialchars_decode ( htmlspecialchars_decode ), all the tags will NOT be escaped , which threatens security.
How to allow only certain tags to be displayed, or can still use strip_tags , but with a chance of inconvenience for the user (although the user who wants to use them far away is not the user :)) ?
Внимание Эта функция не изменяет атрибуты тегов, разрешенных с помощью allowable_tags, включая такие атрибуты как style и onmouseover, которые могут быть использованы озорными пользователями при посылке текста, отображаемого также и другим пользователям.- Vismanstrip_tags()deletes the tags, and I don’t need to delete them. Need to leave selected. - user269127