1

Using below code i'm getting cms page contents by page_id

$content = Mage::getModel('cms/page')->load(6)->getContent();       

print_r($content);

it's fetching value from database, so i'm getting invalid special characters like /r/n added and all </ is replaced with <\/

Is there any magento way to remove this invalid characters ?

1
  • hello feel free to accept amit's answer, if it helped you Feb 14, 2015 at 4:53

1 Answer 1

1

Vinoth, $content is a cms content for getting proper result you need to emulate this content using Cms Emulator,which give extract result of this container.

            $helper = Mage::helper('cms');
            $processor = $helper->getBlockTemplateProcessor();
            $html = $processor->filter($content);
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.