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   2630 Views

Avatar
Simonm

Community Member, 2 Posts

17 December 2008 at 11:38am

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

Community Member, 604 Posts

17 December 2008 at 12:02pm

Edited: 17/12/2008 12:03pm

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

Community Member, 2 Posts

18 December 2008 at 8:15am

Hi Aaron,

Thanks for the quick response to my problem.

Cheers

Avatar
mapes911

Community Member, 12 Posts

31 December 2008 at 8:34pm

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

Community Member, 7 Posts

3 January 2009 at 5:10am

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

Community Member, 18 Posts

13 January 2009 at 1:01am

Hi michaek,

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

Thanks!

Avatar
michaek

Community Member, 7 Posts

24 January 2009 at 3:35am

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

Community Member, 1 Post

10 March 2009 at 12:49am

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?