The search results page shows the content of <script> tags which is not something that is supposed to be displayed to an end-user.
Some of my content pages consist solely of a small snippet of javascript which uses AJAX to populate the actual data displayed to the user. The pages themselves work fine but the search results page shows the actual javascript code rather than just the human-readable content of the page.
I didn't expect to see my dynamic AJAX content in the search results page, but I certainly do not think it should show the javascript code to the user. It should filter this out and only show a human-readable sample of the page.
For example, I have a page which contains:
<div id="data"></div>
<script type="text/javascript">
loadData("pacificObsSynops_91680", renderSynops, "data");
</script>
and the search results show:
RSMC Nadi
RSMC Nadi ...
Fiji Contacts
... Fiji Meteorological Service Private Mail Bag Nadi Airport FIJI Tel: +679 672 4888 Email: rajendra@met.gov.fj ...
Nadi Metars
loadData("pacificObsMetars_91680", renderMetars, "data"); ...
Nadi (Fiji)
loadData("pacificUKMOEPS_91680", renderImage, "data"); ...
Nadi Synops
loadData("pacificObsSynops_91680", renderSynops, "data"); ...
It would be better if it only displayed the page title but not the sample underneath it as in this case it isn't something the user should see.
Comments
Comment #1
jhodgdonI just tested this. It appears it's an issue in Drupal 6 as well as (according to this reporter) Drupal 5. I am not seeing it happen in Drupal 7.
I tihink it should probably be fixed.
Comment #2
jhodgdonRelated issue:
#131559: JavaScript inside node with PHP filter causes problems on search results page
Comment #3
jhodgdonTalked with Gabor (the Drupal 6 branch maintainer) and D6 issues are really not being committed unless they're really essential -- we really don't have a test system for Drupal 6 and it's too dangerous. So... I'm sorry but this is a "won't fix" for Drupal 6.