Index: MpdlXmlTextServer.py
===================================================================
--- MpdlXmlTextServer.py	(revision 495)
+++ MpdlXmlTextServer.py	(revision 496)
@@ -7,4 +7,5 @@
 import sys
 import logging
+import urllib
 import documentViewer
 from documentViewer import getTextFromNode, serializeNode
@@ -122,5 +123,5 @@
         return "no text here"   
                        
-    def getNumPages(self,docinfo=None):
+    def getNumPages(self, docinfo):
         """get list of pages from fulltext and put in docinfo"""
         if 'numPages' in docinfo:
@@ -217,5 +218,5 @@
     def getTranslate(self, query=None, language=None):
         """translate into another languages"""
-        data = self.getServerData("lt/lex.xql","document=&language="+str(language)+"&query="+url_quote(str(query)))
+        data = self.getServerData("lt/lex.xql","document=&language="+str(language)+"&query="+urllib.quote(query))
         #pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lex.xql","document=&language="+str(language)+"&query="+url_quote(str(query)))
         return data
@@ -223,5 +224,5 @@
     def getLemma(self, lemma=None, language=None):
         """simular words lemma """
-        data = self.getServerData("lt/lemma.xql","document=&language="+str(language)+"&lemma="+url_quote(str(lemma)))
+        data = self.getServerData("lt/lemma.xql","document=&language="+str(language)+"&lemma="+urllib.quote(lemma))
         #pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lemma.xql","document=&language="+str(language)+"&lemma="+url_quote(str(lemma)))
         return data
@@ -229,5 +230,5 @@
     def getLemmaNew(self, query=None, language=None):
         """simular words lemma """
-        data = self.getServerData("lt/lemma.xql","document=&language="+str(language)+"&lemma="+url_quote(str(query)))
+        data = self.getServerData("lt/lemma.xql","document=&language="+str(language)+"&lemma="+urllib.quote(query))
         #pagexml=self.template.fulltextclient.eval("/mpdl/interface/lt/lemma.xql","document=&language="+str(language)+"&lemma="+url_quote(str(query)))
         return data
Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 495)
+++ documentViewer.py	(revision 496)
@@ -8,5 +8,5 @@
 
 from Ft.Xml import EMPTY_NAMESPACE, Parse
-from Ft.Xml.Domlette import PrettyPrint, Print
+import Ft.Xml.Domlette
 import os.path
 import sys
@@ -44,5 +44,5 @@
     """returns a string containing node as XML"""
     buf = cStringIO.StringIO()
-    Print(node, stream=buf, encoding=encoding)
+    Ft.Xml.Domlette.Print(node, stream=buf, encoding=encoding)
     s = buf.getvalue()
     buf.close()
@@ -173,7 +173,7 @@
         return self.template.fulltextclient.getSearch(**args)
 
-    def getNumPages(self, **args):
+    def getNumPages(self, docinfo):
         """get numpages"""
-        return self.template.fulltextclient.getNumPages(**args)
+        return self.template.fulltextclient.getNumPages(docinfo)
 
     def getTranslate(self, **args):
@@ -267,6 +267,6 @@
         if mk is None:
             return ""
-    	if type(mk) is not ListType:
-    		mk=[mk]
+        if not isinstance(mk, list):
+            mk=[mk]
         for m in mk:
             ret+="mk=%s"%m
@@ -306,5 +306,6 @@
                 
         # quote values and assemble into query string
-        ps = "&".join(["%s=%s"%(k,urllib.quote(v)) for (k, v) in params.items()])
+        #ps = "&".join(["%s=%s"%(k,urllib.quote(v)) for (k, v) in params.items()])
+        ps = urllib.urlencode(params)
         url=self.REQUEST['URL1']+"?"+ps
         return url
@@ -588,5 +589,5 @@
             if not docinfo['imagePath']:
                 # text-only, no page images
-                docinfo = self.getNumPages(docinfo) #im moment einfach auf eins setzen, navigation ueber die thumbs geht natuerlich nicht    
+                docinfo = self.getNumPages(docinfo)
          
         presentationUrls = dom.xpath("//texttool/presentation")
