1

I'm use CKeditor, which inserts b and strong tags for bold text, and sometimes when Drupal is showing teasers, only the opening tag is included. Resulting in the bold type face cascading down and being applied to all the text below it. Is there any way to filter out particular html tags(strong, b) from the teaser display in views?

EDIT: If one chooses to use fields, there is also the option in views to strip all html but leave particular tags, which is can accomplish the same thing but from the opposite direction

1 Answer 1

0

I assume you are using "show teasers option" for rows if yes switch to fields option.

Once you are using the fields add body field and add "Trim this field" then you could either click field may contain html, which will close the html tags before cut-off or you could pick strip html all together...

enter image description here

3
  • Thanks this definitely helps and it's what I'll use for now. Do you know of any way to strip individual tags by name? so not to allow "strong" to appear at all in the views output?
    – A_funs
    Commented May 1, 2012 at 5:37
  • @A_funs The way i would do that is open theme information get the possible override name for theme files, and create a custom override in which i would do str_replace(<strong>,'',$variable); str_replace(</strong>,'',$variable); Hope this helps... Commented May 1, 2012 at 14:52
  • Ahh also a good technique
    – A_funs
    Commented May 1, 2012 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.