The file that renders the HTML for the textarea parameters is:
/libraries/joomla/html/parameter/element/textarea.php
on line 43:
Code: Select all
$value = str_replace('<br />', "\n", $value);
Code: Select all
$value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
An example is the simple &
If you place that in a textarea parameter, then when you save it, it actually saves to the db as &. However, when rendered back to the textarea it is rendered in HTML as &. This is interpreted by the browser to represent a literal &. Thus when you save it again, you actually save & and not & to the database.
To preserve the character in HTML you have to convert & to & before rendering to HTML. Thus the browser treats it as the literal &.