htmlspecialchars (utf-8 encoding)

Before form post

String is a value coming from a database record in its cleanest form: String: ? < > ' - " `´& % ‰ € ® 2011

For use in a text form, especially the double quotes, must be encoded so the value="" doesn't break. We use htmlspecialchars (ENT_COMPAT) function. ENT COMPAT only forces double quotes to be changed into &quot; (besides < > ? &)


The value of title inside this form looks like String: ? &lt; &gt; ' - &quot; `´&amp; % ‰ € ® 2011