Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » HTML TAGS Showing up in blog posts

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1197 Views
  • bigstack
    Avatar
    Community Member
    2 Posts

    HTML TAGS Showing up in blog posts Link to this post

    not sure if this is a blog module problem or a regular site problem.

    but when ever i make a post and use the wsywig editor to add in html tags the html is not parsed and all the tags are shown as plain text.

    I am a new user to silverstripe, so maybe i just did something wrong in the editor...

    but even when i delete everything and simply try and put a blockquote in to a empty page it shows the html tags on the published site.

    Unless someone can give me an explanation or solution in the next 48 hours i will be moving on from silverstripe. It appeared to be a simple solution and a good alternative to wordpress, but it is just not there yet, I have had several other glitches that I have figured out and I am just not up for fixing others problems, I just wanted to have a cms/blog that was easy to setup and deal with and that is just not happening, good luck with your project.

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: HTML TAGS Showing up in blog posts Link to this post

    Have you enabled wyiwyg editing for the blog module? http://api.silverstripe.org/modules/blog/trunk/blog/BlogEntry.html#methodallow_wysiwyg_editing. Out of the box I do believe it uses BBCode rather than HTML.

    You will need this in your config file to enable it

    BlogEntry::allow_wysiwyg_editing();

  • Anonymous user
    Avatar
    Community Member
    8 Posts

    Re: HTML TAGS Showing up in blog posts Link to this post

    I am having the same issue of the blog entries showing the html code and seems to think it is parsing BBS code (or something!). BUT in the BlogEntry.php file it shows as being set for WYSIWYG:

    /**

        * Is WYSIWYG editing allowed?

        * @var boolean

        */

       static $allow_wysiwyg_editing = true;

       

       /**

        * Is WYSIWYG editing enabled?

        * Used in templates.

    further on it tests to see if it is set or not:

       /**

        * Get a bbcode parsed summary of the blog entry

        */

       function ParagraphSummary(){

          if(self::$allow_wysiwyg_editing) {

             return $this->obj('Content')->FirstParagraph('html');

          } else {

             $parser = new BBCodeParser($this->Content);

             $html = new HTMLText('Content');

             $html->setValue($parser->parse());

             return $html->FirstParagraph('html');

          }

       }

    The code should assume WYSIWYG editing is turned on but somehow doesn't. Does anyone have any ideas?

    Cheers
    Pete

  • Anonymous user
    Avatar
    Community Member
    8 Posts

    Re: HTML TAGS Showing up in blog posts Link to this post

    A little bit more searching found the answer in this post:

    http://silverstripe.org/general-questions/show/5932#post256657

    1197 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.