Top "Htmlspecialchars" questions

htmlspecialchars is a PHP function that convert special characters to HTML entities.

How to replace decoded Non-breakable space (nbsp)

Assuming I have a sting which is "a s d d" and htmlentities turns it into "a s&…

php special-characters htmlspecialchars
Laravel htmlspecialchars() expects parameter 1 to be string, object given in my project?

So i'm trying to code a simple website form. But it has this htmlspecialchars error. I've tried to make {{ $message }} …

php laravel web laravel-blade htmlspecialchars
when to use htmlspecialchars() function?

Hi I was wondering when is the appropriate place to use htmlspecialchars(). Is it before inserting data to database or …

php htmlspecialchars
What do the ENT_HTML5, ENT_HTML401, ... modifiers on html_entity_decode do?

Since php 5.4 html_entity_decode introduces four new flags, with a minimal explanation ENT_HTML401 Handle code as HTML 4.01. ENT_…

php html html-entities htmlspecialchars
How to use javascript to get html special characters in text input

I want to sent some html special character to text field and then later use javascript to get it back …

javascript html escaping special-characters htmlspecialchars
htmlspecialchars is dropping characters

I'm trying to use htmlspecialchars but it doesn't seem to be working. I'm using OSX 10.9.1 and PHP 5.4.17. I write: var_…

php htmlspecialchars
htmlspecialchars utf-8 returns empty string

I'm doing a .php RSS generator and I have a problem trying to get data from my database in this …

php mysql utf-8 htmlspecialchars
Notice: Use of undefined constant ENT_HTML5 - assumed 'ENT_HTML5'

I am trying to create a simple method which accepts the parameters for htmlspecialchars. Although I am getting PHP notice: …

php htmlspecialchars
Escape only single quotes (leave double quotes alone) with htmlspecialchars()

I know there are other ways of of escaping only single quotes (such as this answer), but it appears to …

php escaping htmlspecialchars
Is there a Python equivalent to the PHP function htmlspecialchars()?

Is there a similar or equivalent function in Python to the PHP function htmlspecialchars()? The closest thing I've found so …

php python html-entities htmlspecialchars