Sharing is helping.

We offer you this space to share your knowledge about Magento and learn from our experienced customers.

    Home Forums Theme Forum HelloUno Product Name HTML Escaping

    This topic contains 1 reply, has 2 voices, and was last updated by  Anonymous 6 years ago.

    Viewing 2 posts - 1 through 2 (of 2 total)
    • Author
    • #6583


      There’s an error in the template used when displaying a product (catalog/product/view.phtml). Here’s the offending line:

      <h3 class=”product-name”><?php echo $_helper->productAttribute($_product, $this->htmlEscape($_product->getName()), ‘name’) ?></h3>

      A name such as:

      Tablet w/7″ screen & something else

      When viewed on the frontend, it displays the quote as [&]quot and the ampersand as [&]amp

      Removing the htmlEscape call fixes this (which makes it work just like the default theme).



      That’s correct, thanks for posting this issue. Also try to add the nl2br where the htmlEscape used to be, like this: …$this->nl2br($_product->getName()), ‘name’) ?></h3>

      The nl2br is used when you add an enter space in the product name, this will show an enter space in the frontend, without have to add a
      in the name.


    Viewing 2 posts - 1 through 2 (of 2 total)
    Reply To: Product Name HTML Escaping
    Your information:

    <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">