diff documentViewer.py @ 514:c55e376be01b

search works even with unicode...
author casties
date Tue, 28 Feb 2012 19:46:37 +0100
parents 67095296c95a
children 7d7b639d7be7
line wrap: on
line diff
--- a/documentViewer.py	Tue Feb 28 19:10:08 2012 +0100
+++ b/documentViewer.py	Tue Feb 28 19:46:37 2012 +0100
@@ -17,7 +17,7 @@
 import re
 import string
 
-from SrvTxtUtils import getInt, getText, getHttpData, refreshingImageFileIndexHtml
+from SrvTxtUtils import getInt, utf8ify, getText, getHttpData, refreshingImageFileIndexHtml
     
 def serializeNode(node, encoding="utf-8"):
     """returns a string containing node as XML"""
@@ -381,7 +381,7 @@
         """returns URL to documentviewer with parameter param set to val or from dict params"""
         urlParams = self.getParams(param=param, val=val, params=params, duplicates=duplicates)
         # quote values and assemble into query string (not escaping '/')
-        ps = paramSep.join(["%s=%s"%(k,urllib.quote_plus(unicode(v),'/')) for (k, v) in urlParams.items()])
+        ps = paramSep.join(["%s=%s"%(k, urllib.quote_plus(utf8ify(v), '/')) for (k, v) in urlParams.items()])
         if baseUrl is None:
             baseUrl = self.getDocumentViewerURL()
             
@@ -396,7 +396,7 @@
     def getInfo_xml(self,url,mode):
         """returns info about the document as XML"""
         if not self.digilibBaseUrl:
-            self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary"
+            self.digilibBaseUrl = self.findDigilibUrl() or "http://digilib.mpiwg-berlin.mpg.de/digitallibrary"
         
         docinfo = self.getDocinfo(mode=mode,url=url)
         pt = getattr(self.template, 'info_xml')