Skip to content

InboundXML: Redirect does not encode URLs => document parse failure on TelAPI #7

Description

@YAmikep

Using Redirect, the url is not properly encoded which leads to "Document parse failure" error on TelaPI when the document is parsed. (See the & char.)

Just so you know, Gather well encodes the URL: no parsing error is raised when TelAPI parses the document.

Redirect should encode the URL the same way Gather does it.

Thanks

from telapi import inboundxml
url = 'http://www.example.com?a=a&b=b&c=c'

In [39]: print inboundxml.Gather(action=url)
<Gather action="proxy.php?url=http%3A%2F%2Fwww.example.com%3Fa%3Da%26amp%3Bamp%3Bb%3Db%26amp%3Bamp%3Bc%3Dc"></Gather>

In [40]: print inboundxml.Redirect(url)
<Redirect>http://www.example.com?a=a&b=b&c=c</Redirect>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions