Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Blog Module

Discuss the Blog Module.

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

Html code appearing in my blog posts?


Reply

8 Posts   2558 Views

Avatar
Simonm

17 December 2008 at 11:38am Community Member, 2 Posts

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

Avatar
Double-A-Ron

17 December 2008 at 12:02pm (Last edited: 17 December 2008 12:03pm), Community Member, 604 Posts

Hi Simon,

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

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

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

Cheers
Aaron

Avatar
Simonm

18 December 2008 at 8:15am Community Member, 2 Posts

Hi Aaron,

Thanks for the quick response to my problem.

Cheers

Avatar
mapes911

31 December 2008 at 8:34pm Community Member, 12 Posts

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!

Avatar
michaek

3 January 2009 at 5:10am Community Member, 7 Posts

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.

Avatar
Trym

13 January 2009 at 1:01am Community Member, 18 Posts

Hi michaek,

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

Thanks!

Avatar
michaek

24 January 2009 at 3:35am Community Member, 7 Posts

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.

Avatar
larrrybird

10 March 2009 at 12:49am Community Member, 1 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?