Forum

Thread tagged as: Blog, Redactor

Redactor showing HTML in preview and published page

Hi, I have Redactor enabled in the blog app textarea and noticed that after adding content, the preview or published page view is outputting HTML code instead of the basic page layout.

I'm running Perch: 2.5.2, PHP: 5.5.14, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $, with PDO Server OS: Linux, litespeed Installed apps: content (2.5.2), assets (2.5.2), perch_blog (4.1), perch_events (1.9), perch_backup (1.2)

Many thanks, Phil

Phil Simpson

Phil Simpson 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see your template?

Thanks Rachel. Here's the template:

<div class="hentry">
    <h1>
        <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="entry-title">
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
        </a>
    </h1>
    <p class="entry-published date">
        <perch:blog id="postDateTime" type="date" label="Date" time="true" format="%d %B %Y" divider-before="Meta information" /> 
        <perch:if exists="authorGivenName">
            by <perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" />
        </perch:if>
    </p>
    <perch:if exists="image">
        <div>
            <img src="<perch:blog id="image" type="image" width="870" height="522" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description entry-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="redactor" textile="true" size="xxl autowidth" required="true" />
    </div>
</div>

<perch:blog id="excerpt" type="textarea" label="Excerpt" textile="true" order="3" suppress="true" size="s" />
<perch:blog id="image" type="image" width="870" height="522" crop="true" suppress="true" />

Drew McLellan

Drew McLellan 2638 points
Perch Support

Change textile="true" to html="true"

Thanks. Just tried that but the HTML is still showing in preview and the published post.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you re-saved the post?

Looks like my original edits to the template weren't being picked up by my host's web server. All working fine now. Many thanks.