Strip Image_Assist filter tags from description when set automatically from teaser
WildBill - November 7, 2009 - 00:15
| Project: | Nodewords |
| Version: | 6.x-1.x-dev |
| Component: | Third-party modules integration |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Jump to:
Description
Thanks for adding the "Use node teaser if the description meta tag is not set" feature back in. Would it be possible to strip out the tags that are added by Image Assist? They look like this:
[img_assist|nid=24|title=Christopher Columbus and the natives|desc=|link=popup|align=left|width=340|height=259]
If you add an image near the top of your post (and it fits within the teaser) then it makes the description meta tag very ugly.
Thanks!

#1
Are those tags added by the module automatically, or are they the input of the user?
Thanks for bringing this out.
#2
They are added automatically by the module, when the user adds an image to a node. The tag and the rest of the body are saved in the Body field.
#3
#4
Thank for the information, WildBill.
It should be enough to find a matching with
/\[img_assist.*\]/i, and replace it with an empty string.#5
The code has been changed, and committed in CVS.
Thanks again for your help.
#6
Cool, thanks Kiam.
#7
The same problem with Image Browser v2 code.
It appears in automatically generated description as
[ibimage==5778==thumbnail==preview==blank==ibimage_right]
#8
I will open a different issue for this case (see #634106: Strip the text added by Image Browser).
#9
I wonder if it would be worth creating a field in the admin settings, so that ALL of these tags could be omitted. Something like a "Strip content which matches the following pattern" or something like that. Then the user could enter [img_assist*] on one line, and then [ibimage*] on another line, and the asterisk would act as a wildcard of course. Not sure how difficult that would be though.
#10
It should not be too difficult, and it would make sense.
I think that to consider users who don't want to bother by knowing the details, the settings should contain an option for the known text to filter, and an option for a custom regular expression for advanced users.
#11
I created a different report for the user interface (see #635386: Add more options to filter the text present in the node teaser used as meta tag content).