G
G
Grisha Nikolsky2015-11-19 19:38:17
WordPress
Grisha Nikolsky, 2015-11-19 19:38:17

How to use data escaping?

Hello. I read an article about data shielding. Before that, I came across this, but somehow I didn’t think about the essence. So I read about the most standard functions, such as esc_html(), antispambot(). It seems like I understand their purpose, but nevertheless I decided to work with them in practice, use these functions, see what will happen, how it will work.
I display the following on one of the pages of the wordpress site:
echo antispambot("[email protected]");
It outputs [email protected], which seems to be the right thing, but I can’t figure out where the function returns values ​​like

//Вернет "narayanprusty@sitepoint.com"

After all, this is the meaning of this function.
I hope I made my point clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2015-11-19
@VoxelGod

You are confusing something.
Escaping is used if you need to
1) output special characters that have a special meaning in such a way that they are ordinary literal characters
2) remove special characters that can be injected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question