soluce spec chars trnsfrmd when edited
Status: Inactive
Brought to you by:
wigleys
- in workbench special chars are transformed into HTML
entities before put in the DB (I don't agree with this
approach because data should be modified after
retriving it from DB to be displayed not before even
being put in DB since it may need to be displayed in
something else than a web browser).
- when editing an issue more than twice to put new
resolutions, the special characters of the current
resolution (a é ŕ & or other ) turns to it's html code
in the form withch makes text illegible.
- to correct this issue replace
$resolution = htmlentities($resolution, ENT_QUOTES);
with
#$resolution = htmlentities($resolution, ENT_QUOTES);
to make it only a comment ...
- it should then work well
Logged In: NO
The solution is:
trasform only the new resolution in html format.
I use a new resolution1 variable that contain only the new
resolution input text.
Then I parse only this variable with htmlentities and after this I
add this string to the oldest resolutions into the $resolution
variable.
if ($HTTP_POST_VARS["newresolution"]){
$resolution1 = "$now - $login wrote:
\n" .$HTTP_POST_VARS["newresolution"]."\n";
}
#look for any special characters
$title = htmlentities($HTTP_POST_VARS["title"],
ENT_QUOTES);
$description = htmlentities($HTTP_POST_VARS
["description"], ENT_QUOTES);
$resolution1 = htmlentities($resolution1, ENT_QUOTES);
$resolution .= $resolution1;
it should then work well