not sure the difference but I used  
for adding a white space
..then passed it through wp_kses()
The correct HTML entity for a non-breaking space is
— note the ;
which is required and without it (i.e.  
), the entity is not valid and when used with wp_kses()
, you'd get &nbsp
instead of a non-breaking space.
strangely it was working fine before I used wp_kses()
I'm pretty sure it's because the browser is smart enough and auto-corrected it to
. :-)
So, always use valid HTML entities and also tags (e.g. close a <div>
with a </div>
), regardless you use wp_kses()
or not. Don't rely on "intelligent guess" or auto correction by the browser.
 
or
? And what's the exactwp_kses()
code you used? 
for adding a white space ..then passed it through wp_kses()
is the correct one - the;
is required. Otherwise, that's an invalid HTML entity and 
would result in&nbsp
.