Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

properly escaping URL appearing inside xml

  • Loading branch information...
commit 62e8c8794c201e038540c671df944bd250c5fdfe 1 parent c68c2c8
@yig yig authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  boto/mturk/question.py
View
3  boto/mturk/question.py
@@ -19,6 +19,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
+import xml.sax.saxutils
class Question(object):
template = "<Question>%(items)s</Question>"
@@ -71,7 +72,7 @@ class ExternalQuestion(ValidatingXML):
template = '<ExternalQuestion xmlns="%(schema_url)s"><ExternalURL>%%(external_url)s</ExternalURL><FrameHeight>%%(frame_height)s</FrameHeight></ExternalQuestion>' % vars()
def __init__(self, external_url, frame_height):
- self.external_url = external_url
+ self.external_url = xml.sax.saxutils.escape( external_url )
self.frame_height = frame_height
def get_as_params(self, label='ExternalQuestion'):
Please sign in to comment.
Something went wrong with that request. Please try again.