Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad attributes/data handling in SGMLib #45143

Closed
wolfete mannequin opened this issue Jun 30, 2007 · 5 comments
Closed

Bad attributes/data handling in SGMLib #45143

wolfete mannequin opened this issue Jun 30, 2007 · 5 comments
Assignees
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@wolfete
Copy link
Mannequin

wolfete mannequin commented Jun 30, 2007

BPO 1745761
Nosy @devdanzin, @ezio-melotti, @merwok, @bitdancer
Files
  • bug_sgml.py: example
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ezio-melotti'
    closed_at = <Date 2011-11-14.17:01:54.870>
    created_at = <Date 2007-06-30.16:38:49.000>
    labels = ['easy', 'type-bug', 'library']
    title = 'Bad attributes/data handling in SGMLib'
    updated_at = <Date 2011-11-14.17:01:54.867>
    user = 'https://bugs.python.org/wolfete'

    bugs.python.org fields:

    activity = <Date 2011-11-14.17:01:54.867>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2011-11-14.17:01:54.870>
    closer = 'ezio.melotti'
    components = ['Library (Lib)']
    creation = <Date 2007-06-30.16:38:49.000>
    creator = 'wolfete'
    dependencies = []
    files = ['2411']
    hgrepos = []
    issue_num = 1745761
    keywords = ['easy']
    message_count = 5.0
    messages = ['32431', '85628', '116699', '147613', '147618']
    nosy_count = 6.0
    nosy_names = ['wolfete', 'ajaksu2', 'ezio.melotti', 'eric.araujo', 'r.david.murray', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1745761'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @wolfete
    Copy link
    Mannequin Author

    wolfete mannequin commented Jun 30, 2007

    When feeding an parser with a tag in which its arguments contain a < (as in <a href='http://www.example.org/"\<;'>example</a> the SGMLParsers doesn't handle the data/arguments correcly. For example, with the above string I get:

    Fed: <a href='http://www.example.org/"\>;'\>example\</a>
    Tag opened: a
    Arg href -> http://www.example.org/"\>;
    Arg escaped 'http://www.example.org/"\>;'
    Data: ;'>example
    Tag closed: a

    I have attached a small example.

    I'm using python2.5.1

    Cheers,

    �lvaro.

    @wolfete wolfete mannequin added stdlib Python modules in the Lib dir labels Jun 30, 2007
    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 6, 2009

    Confirmed in trunk.

    @devdanzin devdanzin mannequin added type-bug An unexpected behavior, bug, or error labels Apr 6, 2009
    @devdanzin devdanzin mannequin added easy labels Apr 22, 2009
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Sep 17, 2010

    Can we close this as sgmllib only supported htmllib which has been superseded by HTMLParser?

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 14, 2011

    New changeset 3c3009f63700 by Ezio Melotti in branch '2.7':
    bpo-1745761, bpo-755670, bpo-13357, bpo-12629, bpo-1200313: improve attribute handling in HTMLParser.
    http://hg.python.org/cpython/rev/3c3009f63700

    New changeset 16ed15ff0d7c by Ezio Melotti in branch '3.2':
    bpo-1745761, bpo-755670, bpo-13357, bpo-12629, bpo-1200313: improve attribute handling in HTMLParser.
    http://hg.python.org/cpython/rev/16ed15ff0d7c

    New changeset 426f7a2b1826 by Ezio Melotti in branch 'default':
    bpo-1745761, bpo-755670, bpo-13357, bpo-12629, bpo-1200313: merge with 3.2.
    http://hg.python.org/cpython/rev/426f7a2b1826

    @ezio-melotti
    Copy link
    Member

    Fixed, thanks for the report!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant