Repository 'tool_factory_2'
hg clone https://toolshed.g2.bx.psu.edu/repos/fubar/tool_factory_2

Changeset 8:9d58cc32a12d (2015-01-12)
Previous changeset 7:61381bad936d (2015-01-12) Next changeset 9:ce5ec1d989fd (2015-01-14)
Commit message:
Uploaded
modified:
rgToolFactory2.py
b
diff -r 61381bad936d -r 9d58cc32a12d rgToolFactory2.py
--- a/rgToolFactory2.py Mon Jan 12 05:01:29 2015 -0500
+++ b/rgToolFactory2.py Mon Jan 12 05:27:52 2015 -0500
b
@@ -145,7 +145,7 @@
      "<": "&lt;",
      "$": "\$"
      }
-html_unescape_table = dict(zip(html_escape_table.values(),html_escape_table.keys()))
+
 def html_escape(text):
      """Produce entities within text."""
      return "".join(html_escape_table.get(c,c) for c in text)
@@ -153,7 +153,8 @@
 
 def html_unescape(text):
      """Revert entities within text."""
-     return "".join(html_unescape_table.get(c,c) for c in text)
+     t = text.replace('&amp;','&').replace('&gt;','>').replace('&lt;','<').replace('\$','$')
+     return t
      
 def cmd_exists(cmd):
      return subprocess.call("type " + cmd, shell=True,