Magento Forum

   
Page 1 of 2
HTML tags ignored in Category Description field
 
plx
Member
 
Avatar
Total Posts:  43
Joined:  2008-04-25
 

When I write a category description that includes HTML tags and check it in the frontend, certain tags are ignored, even though they all still show in the source code as if everything is fine. <h2> and <strong> pass just fine, but <ul> and <li> get ignored.

Is there a configuration setting I’m missing, or is there something in one of the CSS files that is preventing these tags from displaying correctly? I’ve spent hours looking everywhere I could think of, and I’ve come up with nothing!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jean jack
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2008-07-21
Russia
 

I found the same problem.
HTML tags ignores in copyright field in footer.

When i have a look on source of page, i expect to see “<p>XXX</p>”, but found this “<p;>XXX;.........”.
This problem appears when i move my installation from localhost to shared server.

I tried enter new text in FireFox, Explorer
The result is the same

I think solution is somewhere in server or magento settings.

 
Magento Community Magento Community
Magento Community
Magento Community
 
smikes
Jr. Member
 
Total Posts:  12
Joined:  2008-09-16
 

I was wondering if you figured out where and in what CSS file you have to add the <ul> <ol> <li> code so that it displays the bullets?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brilliand
Member
 
Total Posts:  34
Joined:  2008-08-29
 

<ul> and <ol> are disabled in reset.css.  Since Magento uses those tags in several places where you definitely do not want bullets, I suggest giving your ul/ol tags a class and setting their list-syle-type to something other than “none” in your custom.css.  (If you want to see where Magento’s ul and ol tags are, just delete the line in reset.css and watch your site get the measles...)

 
Magento Community Magento Community
Magento Community
Magento Community
 
plx
Member
 
Avatar
Total Posts:  43
Joined:  2008-04-25
 

Thank you, very helpful!

 
Magento Community Magento Community
Magento Community
Magento Community
 
wreckerBill
Jr. Member
 
Total Posts:  1
Joined:  2009-01-18
 

Here is a work-around I use in description fields for bullet list:

<table>
 <
tr>
  <
td><strong>&nbsp;&nbsp;</strong></td>
  <
td>My Bullet Item 1.</td>
 </
tr>
 <
tr>
  <
td><strong>&nbsp;&nbsp;</strong></td>
  <
td>My Bullet Item 2.</td>
 </
tr>
 <
tr>
  <
td><strong>&nbsp;&nbsp;</strong></td>
  <
td>My Bullet Item 3.</td>
 </
tr>
 <
tr>
  <
td><strong>&nbsp;&nbsp;</strong></td>
  <
td>My Bullet Item 4.</td>
 </
tr>
</
table>

 
Magento Community Magento Community
Magento Community
Magento Community
 
snarkys
Sr. Member
 
Total Posts:  124
Joined:  2008-04-04
 

I tried the above table but it adds a ton of space above the bullets

anyone figured out a way to add bullets easy ? they are to important to just do without

 
Magento Community Magento Community
Magento Community
Magento Community
 
ajeeta
Jr. Member
 
Total Posts:  9
Joined:  2008-11-06
 

I LOVE you wrekerbill kiss

Your tables work-around for bullet points saved me much time/frustration.  And I didn’t have the same problem with spaces.

Thank you!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jeffrey S
Jr. Member
 
Total Posts:  2
Joined:  2008-05-21
 

Double post.. Sorry
See next

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jeffrey S
Jr. Member
 
Total Posts:  2
Joined:  2008-05-21
 

You can solve your bullet list problem by adding additional settings to the main css file in the theme you use.  For example the boxes.css stylesheet in the blue theme.

The css below will only style the list items that descend from a UL that descends from an element that has the class “std”.  The description.phtml located in <magento-root>/app/design/frontend/default/default/template/catalog/product/view/description.phtml is where the class is set. Most themes are using this. If you are using a custom theme then check your file to see. 

.std  ul li {
    
list-style-typedisc;
    list-
style-positioninside;
    
text-transformnone;
}

The additional line breaks are caused by the nl2br() function. nl2br — Inserts HTML line breaks before all newlines in a string. Below is the contents of the description.phtml file I modified.

<div class="std">
    
<?php /* This was the original - I stripped out the nlbr function to format this field as html without additional br's added.
     echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description')
      */ 
?>
    <?php 
echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $this->getProduct()->getDescription(), 'description'?>

</div>

 
Magento Community Magento Community
Magento Community
Magento Community
 
macneuron
Jr. Member
 
Total Posts:  2
Joined:  2009-03-25
 

Great work!
I spent hours trying to understand how to modify the default bullet format, line-spacing and such.... this worked perfect.

Does anyone happen to know the proper way to add javascript to a product (the product view page of some or all products) and/or static html?

Example- a unit conversion calculator

I understand that adding javascript to the product view should go somewhere in the catalog.xml file (/app/design/frontend/default/your_template/layout/catalog.xml)....? Assuming this is true, why and how do i include it. Also, where do the javascript files go?

Any help is much appreciated!

 
Magento Community Magento Community
Magento Community
Magento Community
 
GreenLEEP
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-10-23
Montreal, QC, Canada
 
ajeeta - 12 April 2009 07:13 AM

I LOVE you wrekerbill

Your tables work-around for bullet points saved me much time/frustration.  And I didn’t have the same problem with spaces.

Thank you!!!

I second that sentiment...worked loverly

 
Magento Community Magento Community
Magento Community
Magento Community
 
TMED
Jr. Member
 
Total Posts:  5
Joined:  2009-04-15
 

I am also having similar kind of issues. When I am putting a table in the product description in the store front table is showing fine however after a huge long empty gap. Any ideas? Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Nick Shaw
Jr. Member
 
Total Posts:  16
Joined:  2009-04-28
 
TMED - 13 May 2009 06:58 AM

I am also having similar kind of issues. When I am putting a table in the product description in the store front table is showing fine however after a huge long empty gap. Any ideas? Thanks

My first suggestion would be to install Firebug for firefox, then you can easily ‘inspect’ the elements of your page that look strange and see what css is applied. If the css is screwed then you would be best to assign an id or custom class to the element and set the correct css (probably by adding a custom stylesheet to the appropriate module or page.xml)

Nick

 
Magento Community Magento Community
Magento Community
Magento Community
 
TMED
Jr. Member
 
Total Posts:  5
Joined:  2009-04-15
 
Nick Shaw - 14 May 2009 07:42 PM

TMED - 13 May 2009 06:58 AM
I am also having similar kind of issues. When I am putting a table in the product description in the store front table is showing fine however after a huge long empty gap. Any ideas? Thanks

My first suggestion would be to install Firebug for firefox, then you can easily ‘inspect’ the elements of your page that look strange and see what css is applied. If the css is screwed then you would be best to assign an id or custom class to the element and set the correct css (probably by adding a custom stylesheet to the appropriate module or page.xml)

Nick

Thanks much Nick. I will try that. Appreciate your time.
Tom

 
Magento Community Magento Community
Magento Community
Magento Community
 
will_oz
Jr. Member
 
Total Posts:  15
Joined:  2009-03-11
Adelaide, Australia
 
TMED - 13 May 2009 06:58 AM

I am also having similar kind of issues. When I am putting a table in the product description in the store front table is showing fine however after a huge long empty gap. Any ideas? Thanks

http://www.magentocommerce.com/boards/viewthread/7562

In app/design/frontend/default/default/template/catalog/product/view/description.phtml

delete “nl2br” from “nl2br($this->getProduct()”

This stops each new line (i.e. every time you hit ‘enter’) in you table code adding two <br>s to the frontend appearance. If you do this, some of your previous Product Descriptions may now appear bunched up.

To get around this, don’t delete nl2br, and simply put your tables in custom product attribute fields which naturally lack the “nl2br” tag.

It’d be cool if there was a way to make some product descriptions nl2br-free and others not…

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2