Yuri,
Thanks for the quick response. That seems to fix this one instance yes, but the actual fix might need to be larger. If you take a look at this page and then the text for the entry titled “3 Quick Tips to Make Print and Save Dialogs Bigger and Better” (near the bottom of the page), you’ll see we have a Crosslinking term set for “quick tip” and it’s still being applied to the text “quick tips” on the page. Your fix only excludes instances when their are extra characters before AND after the crosslink term.
Also, in testing your fix I noticed that you might be able to clean up a number of your regex queries in that exclusion array. You have a number that are targeting different parameters:
/src=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i', '/alt=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i', '/title=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i', '/value=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i', '/rel=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i', '/content=("|\')[^"\']*'.$link->keyword.'[^"\']*("|\')/i'
I would assume in general that you’d want to exclude crosslinking for a term that might appear inside “ANY” HTML tag parameter, so could you use a more general regex like this to capture all those instances?
'/.*=("|\')[^"\'](.*?)'.$link->keyword.'(.*?)[^"\']*("|\')/i',
You’d have to test it of course, but it seems this one line may be able to be used in place of the multiple lines.
|