View Single Post
Old 02.11.2005, 04:06   #1 (permalink)
Leohart
Junior Mamber
 
Join Date: Jul 2004
Posts: 26
Leohart is on a distinguished road
Default General Editor Mambot question

Hello everyone,

I am trying to learn how Editor Mambots work so that I can (perhap) contribute to them.

The question: How do they get around getting the HTML content from MySQL DB and put them into textarea value attributes without having problem with " in the HTML.

I tried to do the same thing on my own with some simple PHP but everything turned out messy since any double-quote (") would make the value="" attribute escape and cause HTML error.

Example (to clarify):
PHP Code:
$ContentFromDB '<p class="someclass">The doubequote of class attributes would cause problem </p>' 
Quote:
<textarea name="someName" value="<?=$Material?>"</textarea>

I tried to go through the code but without avail. My guess is the content from MySQL is load but tags are stripped ( " becomes &quot; and <> becomes $lt;$gt; and so on).

How do I going about doing the same thing? I mean stripping the tags and get TinyMCE (core of mosCE) to reassemble them?
Leohart is offline   Reply With Quote
Sponsored Links