Question

So I want to store richtext in my database created from Flex 3's rich text editor, but I am unable to.

for example this would need to be placed into the database:

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="10" COLOR="#0B333C" LETTERSPACING="0" KERNING="0">sdfsdfdsfsdfdsf</FONT></P></TEXTFORMAT>

Is it because of all the special characters?

Is it common practice to store formatted text in a database?

Thanks

Was it helpful?

Solution

You need to escape such strings before putting them into a query. Alternatively use prepared statements.

Yes, it is a common practice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top