searching bibligraphy adds <em></em> around result
princeofwales - October 6, 2009 - 15:26
| Project: | Bibliography Module |
| Version: | 6.x-1.7 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Frank Steiner |
| Status: | closed |
Description
Search for document using biblio search (not drupal site search)
result title has em tags around it, i.e.
Search results for em search term /em [Reset Search]

#1
Tags were added before check_plain.
Please try the attached patch.
#2
Will this result in overlapping tags?
$content .= '<div class="biblio-current-filters"><b>'.t('Search results for <em>').'</b>';#3
Yes it will.
I would recommend (and have already implemented in the code)...
### Eclipse Workspace Patch 1.0#P biblio-dev
Index: biblio.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/biblio/biblio.pages.inc,v
retrieving revision 1.1.2.97
diff -u -r1.1.2.97 biblio.pages.inc
--- biblio.pages.inc 30 Sep 2009 15:48:25 -0000 1.1.2.97
+++ biblio.pages.inc 7 Oct 2009 12:57:27 -0000
@@ -588,7 +588,7 @@
array_shift($args);
$value = db_escape_string($args[0]);
if ($type == 'search') {
- $search_content = '<em>'. array_shift($args).'</em>';
+ $search_content = array_shift($args);
continue;
}
if ($type == 'term_id') {
@@ -634,7 +634,7 @@
}
if ($search_content) {
$content .= '<div class="biblio-current-filters"><b>'.t('Search results for ').'</b>';
- $content .= check_plain($search_content);
+ $content .= '<em>'. check_plain($search_content) .'</em>';
if ($filtercontent) {
$content .= '<br><b>'.t('Filters').': </b>';
}
#4
Thanks for both the patches...let me see where the issue is in the code.
Does that mean that the easiest thing to do is to download the module, extract the one file, and upload that to my site(s)?
#5
You could just edit biblio.pages.inc and change line 591 to look like this...
$search_content = array_shift($args);and change line 637 to look like this...
$content .= '<em>'. check_plain($search_content) .'</em>';Ron.
#6
poifect! Many thanks!
#7
#8
http://drupal.org/cvs?commit=272548
#9
Automatically closed -- issue fixed for 2 weeks with no activity.