SWFTools Javascript is being indexed for search. Use the Drupal search facility and type 'flashvars' as the search term and you get a handful of results that show the generated JavaScript. That wouldn't be a problem in itself as not many people are likely to search for the term 'flashvars', however ALL the JavaScript is indexed, so a search for something like 'audio' also shows loads of results, each one citing the JavaScrtipt source where the url the mp3 file contains the word 'audio' in its path.

eg. http://www.concern.net/search/node/flashvars
eg. http://www.concern.net/search/node/audio

I read about a similar issue at #296814: Javascript is being indexed for search and I believe they fixed it by wrapping the JavaScript in comment tags (http://drupalcode.org/viewvc/drupal/contributions/modules/op_video/playe...)

Comments

mrfelton’s picture

Status: Active » Needs review
StatusFileSize
new668 bytes

Attached patch seems to do the trick. You need to ensure that swftools input format comes after any html correctors (this is in your docs already, but it is absolutely necessary with this patch applied because otherwise <!-- will be converted to &lt;-- and you'll just end up with a JavaScript errors) and you need to rebuild the search index.

EDIT: Obviously the links in my original bug report won't show the problem anymore as I have fixed it with this patch.

jaypan’s picture

Can this fix be rolled into a release? I've confirmed that it works.