get_preview strips iframe HTML on server, not on localhost
-
Hi, folks. Using Timber to create templates for my company’s blog. The main blog page shows teaser posts with the
get_preview()
function, like so…<p class="post-content-prev">{{post.get_preview(100, false, '...Read More', false)}}</p>
That forth argument,
false
, should tell Timber not to strip HTML tags from the preview content according to the docs. And generally this works as expected, except in one case.Some posts on the blog will be podcast posts. The first thing you should see is a SoundCloud iframe allowing you to play the podcast. However, using
get_preview()
, as I do for every other post on the main blog template, strips out this iframe and only displays text content below it.What’s even stranger, is that on my localhost, the iframe displays properly. But when that code is run from the production server, no iframe, just the post content below.
Could it be a server settings issue? Some deeper issue with Timber? Any ideas, anyone?
- The topic ‘get_preview strips iframe HTML on server, not on localhost’ is closed to new replies.