[PATCH] Fixed search on libvirt.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ajia pointed out this was broken, I pushed the following patch to
fix it, pushed as site breaker

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard@xxxxxxxxxx  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
commit a41e95db504f638ffe63e75d997344a2692bdb16
Author: Daniel Veillard <veillard@xxxxxxxxxx>
Date:   Thu Sep 12 17:18:32 2013 +0800

    Repair the search on libvirt.org
    
    First make sure that the input is xhtml as the stylesheets expect
    namespaced element, then use a span element instead of a as a
    is treated specially, finally adjust the makefile to check for
    the new span element and replace it with the PHP code

diff --git a/docs/Makefile.am b/docs/Makefile.am
index a76e068..c6a3ead 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -235,7 +235,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
 %.php: %.php.tmp %.php.code.in
 	@if [ -x $(XSLTPROC) ] ; then \
 	  echo "Scripting $@"; \
-	    sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
+	    sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
 	    -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
 	    || { rm $(srcdir)/$@ && exit 1; }; fi
 
diff --git a/docs/search.php.in b/docs/search.php.in
index ee8f4a3..3e1fea2 100644
--- a/docs/search.php.in
+++ b/docs/search.php.in
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
   <body>
     <h1>Search the documentation on Libvirt.org</h1>
 
@@ -9,7 +10,7 @@
     it simply provide a set of keywords:
     </p>
 
-<a id="php_placeholder"/>
+<span id="php_placeholder"/>
 
     <img src="libvirtLogo.png" alt="libvirt Logo" />
 
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]