EllisLab text mark
Advanced Search
     
HTML in Category Description
Posted: 10 July 2012 01:18 PM   [ Ignore ]
Joined: 2006-09-19
100 posts

Is there a way to allow html in category description? I’d like to add a list element but its not allowing html.

Thank You

 
Posted: 10 July 2012 01:26 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-06-12
149 posts

Hi RussWittmann,

What version of EE are you running?

Can you post your EE code so we can have a look?

Thank you,

Mike

 
Posted: 10 July 2012 01:43 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2006-09-19
100 posts

Im using this for ee code

{exp:query sql="SELECT cat_id, cat_name AS category_name, cat_description as category_description FROM exp_categories WHERE cat_url_title = '{segment_2}'"}
    
<h1>{category_name}</h1>
    
{category_description}
    {
/exp:query} 

this is my html

<ul>
<
li>Item</li>
<
li>Item</li>
<
li>Item</li>
<
li>Item</li

and it displays raw html output.

EE version 2.3.1

 
Posted: 10 July 2012 02:54 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2012-06-12
149 posts

Just so I have this correct, you have the following html in your category description:

<ul>
<
li>Item</li>
<
li>Item</li>
<
li>Item</li>
<
li>Item</li>
</
ul

When you try to display this in your query tag it is converting your html code to its encoded value is this correct?

Mike

 
Posted: 10 July 2012 03:07 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2006-09-19
100 posts

it is not out putting the html, just the code.

 
Posted: 10 July 2012 03:12 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2012-06-12
149 posts

I just tested this on my EE 2.5.0 and it works for me. The page is displaying the html code as is with no problems. This might be a bug in your EE 2.3.1 version? Sorry I don’t have that version to test with. I hope that helps.

Mike

 
Posted: 11 July 2012 03:26 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi Russ,

Thanks for posting on the Forums!

My experience is the same as Mike’s - the HTML output worked quite well for me.

If you look at the raw code in the database for this category, do you see anything amiss? Can you show us the HTML source output when you view this template?

Cheers,

 Signature 

How may I help you?

 
Posted: 26 July 2012 02:38 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2002-05-20
12626 posts

Hi Russ,

I split the 1.x discussion off to prevent confusing things.  I’m same as Dan/Mike- looks like it may be a version different unless we’re completely misunderstanding how to test.  For this one, I’d suggest upgrading to see if that takes care of it for you.  It looks like it should.

 Signature