Message from discussion
push by geoffers - Fix grave accent in unquoted attr. on 2010-01-04 15:11 GMT
X-BeenThere: html5lib-commits@googlegroups.com
Received: by 10.151.2.23 with SMTP id e23ls716137ybi.1.p; Mon, 04 Jan 2010
07:12:29 -0800 (PST)
Received: by 10.150.24.36 with SMTP id 36mr23237959ybx.23.1262617949127;
Mon, 04 Jan 2010 07:12:29 -0800 (PST)
Received: by 10.150.24.36 with SMTP id 36mr23237958ybx.23.1262617949104;
Mon, 04 Jan 2010 07:12:29 -0800 (PST)
Return-Path: <3XAVCSxAKAO4SeTUiYjU-dehUfboWeeWbU....@codesite.bounces.google.com>
Received: from mail-gx0-f238.google.com (mail-gx0-f238.google.com [209.85.217.238])
by gmr-mx.google.com with ESMTP id 25si2526472ywh.0.2010.01.04.07.12.28;
Mon, 04 Jan 2010 07:12:28 -0800 (PST)
Received-SPF: pass (google.com: domain of 3XAVCSxAKAO4SeTUiYjU-dehUfboWeeWbU....@codesite.bounces.google.com designates 209.85.217.238 as permitted sender) client-ip=209.85.217.238;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3XAVCSxAKAO4SeTUiYjU-dehUfboWeeWbU....@codesite.bounces.google.com designates 209.85.217.238 as permitted sender) smtp.mail=3XAVCSxAKAO4SeTUiYjU-dehUfboWeeWbU....@codesite.bounces.google.com; dkim=pass (test mode) header...@google.com
Received: by gxk12 with SMTP id 12so49017gxk.2
for <html5lib-commits@googlegroups.com>; Mon, 04 Jan 2010 07:12:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=beta;
h=domainkey-signature:mime-version:x-generated-by:received:message-id
:date:subject:from:to:content-type;
bh=JUk0lb6DCNy7WOO8BbqUJtr4nfDRfpYtRO+SRP9hdh0=;
b=yP+mhqpzEj9uRI/iHL3Y44/RLECEBHBq/KVX08k3kIRPwIv0HBptJqDw94DU2kPhER
VR3YGghDJYULqR0wycmg==
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=google.com; s=beta;
h=mime-version:x-generated-by:message-id:date:subject:from:to
:content-type;
b=lChcQlZFclvVajTpCoXaq671pYqTwF4mWuuDA4faCgX9jk2flfz04jFbzVcGcxRbyP
HORX0XjdzSu1Kq5wY+yA==
MIME-Version: 1.0
X-Generated-By: Google Code
Received: by 10.91.158.14 with SMTP id k14mr1764644ago.13.1262617948047; Mon,
04 Jan 2010 07:12:28 -0800 (PST)
Message-ID: <0016e64098d647cb88047c582...@google.com>
Date: Mon, 04 Jan 2010 15:12:28 +0000
Subject: [html5lib] push by geoffers - Fix grave accent in unquoted attr. on
2010-01-04 15:11 GMT
From: codesite-nore...@google.com
To: html5lib-commits@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Revision: 8782e4d731
Author: Geoffrey Sneddon <geoff...@gmail.com>
Date: Mon Jan 4 07:11:30 2010
Log: Fix grave accent in unquoted attr.
http://code.google.com/p/html5lib/source/detail?r=8782e4d731
Modified:
/python/src/html5lib/tokenizer.py
/testdata/tokenizer/test4.test
=======================================
--- /python/src/html5lib/tokenizer.py Sun Nov 29 04:08:07 2009
+++ /python/src/html5lib/tokenizer.py Mon Jan 4 07:11:30 2010
@@ -907,7 +907,7 @@
self.tokenQueue.append({"type":
tokenTypes["ParseError"], "data":
"expected-attribute-value-but-got-right-bracket"})
self.emitCurrentToken()
- elif data in (u"=", u"<"):
+ elif data in (u"=", u"<", u"`"):
self.tokenQueue.append({"type":
tokenTypes["ParseError"], "data":
"equals-in-unquoted-attribute-value"})
self.currentToken["data"][-1][1] += data
@@ -968,8 +968,8 @@
"eof-in-attribute-value-no-quotes"})
self.emitCurrentToken()
else:
- self.currentToken["data"][-1][1] += data +
self.stream.charsUntil( \
- frozenset(("&", ">", "<", "=", "'", '"')) | spaceCharacters)
+ self.currentToken["data"][-1][1] += data +
self.stream.charsUntil(
+ frozenset((u"&", u">", u'"', u"'", u"=", u"<", u"`")) |
spaceCharacters)
return True
def afterAttributeValueState(self):
=======================================
--- /testdata/tokenizer/test4.test Wed Dec 16 04:02:27 2009
+++ /testdata/tokenizer/test4.test Mon Jan 4 07:11:30 2010
@@ -300,6 +300,10 @@
{"description":"Doctype html x>text",
"input":"<!DOCTYPE html x>text",
-"output":["ParseError", ["DOCTYPE", "html", null, null, false],
["Character", "text"]]}
+"output":["ParseError", ["DOCTYPE", "html", null, null, false],
["Character", "text"]]},
+
+{"description":"Grave accent in unquoted attribute",
+"input":"<a a=aa`>",
+"output":["ParseError", ["StartTag", "a", {"a":"aa`"}]]}
]}