PDA

View Full Version : Ignoring text in alt tags


benstafford
01-20-2006, 03:35 PM
On our sites, we copy "news" articles into vbulletin so users can post replies to the news. These articles have inline images to which we often apply some alt text. When the article is posted in forum, GAL does a replace on the alt text and breaks the image tag. What's the best way to handle this?

For example: http://forum.bargainpda.com/showthread.php?p=44578

We use GAL on "Treo 700w, 700w, Palm Treo 700w" and the alt tag was "treo 700w". I removed the alt tag in the forum post, so the images work again.

Can the regular expression for the replacement be modified?

Thanks,
Ben

The Geek
01-24-2006, 05:38 PM
Hey there,

In a nutshell, no :(

The problem is that in order to balance server load versus usablitliy, GAL uses a regexp that looks for instances of key words with spaces before them OR a small selection of common HTML characters. To make a regexp that ALSO did a forward and backward search on every word to see if its nested in a tag would prove to be VERY server heavy.

THere are a couple options though:
1- Dont have GAL parse that forum
2- put an html tag (i.e. <!--foo--> or maybe &nbsp;) before key words in the alt tags

Hope this helps!