In 9.9.2.2. we’ve added a shortcode called [CLEANHTML] that enables us to remove html elements that we specify from a block of content.
This shortcode can be a replacement for stripping images,links, and any other html element from a block of text.
Here’s an example of how we would use it:
[cleanhtml:
If you notice, is not present. The shortcode above is telling blogsense to include all of the html elements defined and removed the ones that are not included. In our case the shortcode above is removing any images found within the content sourced by a campaign.
What are some case examples of when we would use this technique?
This shortcode was created to help a customer strip all images except the very first image. BlogSense provides and tokens that represent the URL of the first and second image discovered in the post body. The customer could use these tokens to setup an image in his template and then use the [cleanhtml] shortcode to remove all other images from the content he has sourced.
This will help him get rid of annoying buttons and advertisements. BlogSense naturally strips javascript from imported content, but in theory this shortcode would also be able to removed javascript and object embeds as well.
Similar Posts:
- New Shortcode! Also, extra broken image detections added.
- Autoblog: Same Server Image Hosting
- BlogSense 4.5.8.7 Files
- BlogSense 4.5.8.4 Files
- BlogSense -9.0.1.8 Use token varibles in custom fields and bug fix with Mass Create module
Shortcode to strip certain html elements from block of text
No comments:
Post a Comment