Solved

Inserted entry from MCE editor is not rendering HTML on query...

Posted on 2013-12-13
10
322 Views
Last Modified: 2013-12-21
I'm using MCE editor and the entry in the db for each post is something like...

&ltp&gtLorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque placerat risus lacus, eu mollis lorem venenatis ut. Donec imperdiet turpis elit. Suspendisse lobortis commodo elit, et laoreet elit.&lt/p&gt

when I <cfoutput> the result to the front-end I get <p>Lorem ipsum.... </p>

Open in new window


I would like for it to actually render the value as HTML
0
Comment
Question by:brihol44
  • 5
  • 5
10 Comments
 
LVL 25

Expert Comment

by:dgrafx
ID: 39718863
i'm guessing you mean that you want to show the html entities that are in the db instead of the browser converting them to tags or symbols - correct?

use:
<pre><code>
&ltp&gtLorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque placerat risus lacus, eu mollis lorem venenatis ut. Donec imperdiet turpis elit. Suspendisse lobortis commodo elit, et laoreet elit.&lt/p&gt
</code></pre>
0
 

Author Comment

by:brihol44
ID: 39718882
Well, I want them to actually render as HTML so I dont' see <p>  tag or any reference to it. I'm not sure why it's not actually adding it as HTML but instead showing it on the page. I suppose I have to figure out how it's getting in the db first? The MCE editor automatically adds the <p> tags in the entry but it's converting to &ltp&g when it posts the entry to the db.

Thanks for the help!
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 39718955
You do mean inside the editor - correct?
Are you viewing html source?
Just checking.

Are you saying that when you insert <p> into the db - then when you look in the db it has been converted to &lt;p&gt ?

if yes then what init settings do you have in mce editor for entity_encoding?
And also are there settings for MySql concerning this?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:brihol44
ID: 39719077
Hi,

Well it's showing the "<p>" tag actually on the website (dev) on the front page that people see.

Inside the editor it shows correctly in that I only see text. When I click on the "HTML" view button it's...

<p>Loren ipsum.... </p>

My Table info is...

Table Type MyISAM
Default Char Set : utf8
Default Collation: utf8_general_ci


entity encoding :
entity_encoding : 'named',
0
 

Author Comment

by:brihol44
ID: 39719079
oh and...

Are you saying that when you insert <p> into the db - then when you look in the db it has been converted to &lt;p&gt ?
No MCE actually inserts the <p> tag automatically which is fine. My only issue is that it's showing <p>Loren ipsum... </p> that is displaying on the front-end.

The entry in the db is...  &ltp&gtLorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur dapibus, turpis vitae congue hendrerit, purus libero semper turpis, quis egestas tellus augue a odio.&lt/p&gt
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 39719110
For experimentation's sake manually edit the db and replace the &lt;p&gt with <p> and the same for closing.
Then look at the webpage.

does the problem go away or is it the same issue?
0
 

Author Comment

by:brihol44
ID: 39719184
Doing that does work so I guess I have to figure out why MCE is converting the <p> tag to &lt;p&gt. I don't know much about the editor so I'm not too sure yet.
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 220 total points
ID: 39719188
in your tinymce init - do you have an entry for entity_encoding?
set it's value to raw if yes or add it if you don't so that it's:
entity_encoding:"raw"

that might help.
0
 

Author Closing Comment

by:brihol44
ID: 39733992
I ended up using coldfusion to replace the arrow values. I tried all of the things you had mentioned. I'm not sure what's going on with it.
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 39734110
well - thanks for the points!

and i hope you get it squared away!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question