Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Html code appearing in my blog posts?

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 2533 Views
  • Simonm
    Avatar
    Community Member
    2 Posts

    Html code appearing in my blog posts? Link to this post

    Hi,

    Only recently started with SS and starting to build a site with it.

    After installing the blog module have a problem which occurs when i click into read the full post.

    On the full post screen html tags are visable, on the page i get:

    <p>This is a great film <a href="http://www.test.com" target="_blank" title="test link">watch it.</a> etc etc etc</p>

    All i really want to see is:

    this is a great film watch it. etc etc etc

    Is their a fix for this?

    Cheers

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Html code appearing in my blog posts? Link to this post

    Hi Simon,

    The Blog module uses BBCode by default unless this has changed recently.

    Check this archive from the old Forum:
    http://www.silverstripe.org/archive/show/10328

    I think you need to slightly edit your main blog .ss file to parse HTML.

    Cheers
    Aaron

  • Simonm
    Avatar
    Community Member
    2 Posts

    Re: Html code appearing in my blog posts? Link to this post

    Hi Aaron,

    Thanks for the quick response to my problem.

    Cheers

  • mapes911
    Avatar
    Community Member
    12 Posts

    Re: Html code appearing in my blog posts? Link to this post

    Hey guys,

    For those that have read that old post about this subject.. which file to we put the "BlogEntry::allow_wysiwyg_editing('true');"

    Thanks!

  • michaek
    Avatar
    Community Member
    7 Posts

    Re: Html code appearing in my blog posts? Link to this post

    Is there a reason for BBCode to be the default for the Blog module? It seems strange to break the SilverStripe UI convention of editing with TinyMCE - it's more consistent to enter content the same way across the site.

    The first thing I did upon installing the module was to disable BBCode parsing and enable TinyMCE editing, and I think it's likely that's more in line with an end user's expectation.

  • Trym
    Avatar
    Community Member
    18 Posts

    Re: Html code appearing in my blog posts? Link to this post

    Hi michaek,

    Could you share how you disable BBCode parsing and enable TinyMCE editing?

    Thanks!

  • michaek
    Avatar
    Community Member
    7 Posts

    Re: Html code appearing in my blog posts? Link to this post

    It seems (per mapes911 above) that the newest version of the blog module allows you to place "BlogEntry::allow_wysiwyg_editing('true');" in your _config.php file. That would be simplest.

    I can tell you what I did, but I don't recommend following my process, as I hacked the module to remove the BBCode. I've attached 3 diffs that modify the files needed. I'm planning to upgrade to SilverStripe 2.3 and the new Blog module, which is likely a better way to go.

  • larrrybird
    Avatar
    Community Member
    1 Post

    Re: Html code appearing in my blog posts? Link to this post

    This has been a very informative thread to read however, despite going through and changing and unchanging a lot of my files, I still can not get my full blog posts to view correctly (without the html code).

    I changed the blogentry.ss file in both the /blog folder and in my /themes folder and still nothing.

    any thoughts?

    2533 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.