Advertisement
Peaceseeker

pylotro special character fix by Chris Wesseling

Aug 29th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. --- pylotro/PyLotROLauncher/PyLotROUtils.py 2011-06-02 15:38:53.000000000 +0100
  2. +++ pylotro/PyLotROLauncher/PyLotROUtils.py 2012-08-29 12:57:16.122911445 +0100
  3. @@ -33,6 +33,7 @@
  4. import glob
  5. from PyQt4 import QtCore
  6. import xml.dom.minidom
  7. +from xml.sax.saxutils import escape as escape_xml
  8.  
  9. # If Python 3.0 is in use use http otherwise httplib
  10. if sys.version_info[:2] < (3, 0):
  11. @@ -464,7 +465,7 @@
  12. <soap:Body><LoginAccount xmlns=\"http://www.turbine.com/SE/GLS\"><username>%s</username>\
  13. <password>%s</password><additionalInfo></additionalInfo></LoginAccount></soap:Body></soap:Envelope>"
  14.  
  15. - SoapMessage = SM_TEMPLATE%(name, password)
  16. + SoapMessage = SM_TEMPLATE % tuple(map(escape_xml, (name, password)))
  17.  
  18. webresp = None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement