It is about another feature in “Laura Ann” project.
In the wysiwyg text editor, it was recommended to save the page update in both “View” mode and “HTML” mode so that users can update after changing format or changing actual html code in the editor.
“View” update is implemented as default setting. The problem was occurring when trying to update page in “HTML” mode. The updated the page shows all HTML tags code instead of formatted text. I discovered that the reason is that update took all converted html tags constructed by “<” and “>” that were actually put into special HTML code as “<” and “>”. So I had to change everything in special HTML code mode back to normal view mode when saving update to files.
The way to do that is to use this PHP function: html_entity_decode(). It can convert all special HTML code into its special HTML character. With the help of such function, I can easily convert the all the string in one line of code and save the updated string to file to produce the correct result. The reverse function is htmlentities().
PHP Manual LinkL: http://www.php.net/manual/en/function.html-entity-decode.php