Walter Dörwald committed fc38d41

Whether an attribute is allowed has to be checked via their XML name
in the HTMLParser.

Fix a regression: "namespace"=>"xmlns".

Comments (0)

Files changed (1)

 			else: # ; found
 				if part[0] != "#": # named entity
 					name = part[:pos]
-					if name in html.namespace.charrefsByName:
-						node.append(html.namespace.charrefsByName[name](), part[pos+1:])
-					elif name in xsc.namespace.charrefsByName:
-						node.append(xsc.namespace.charrefsByName[name](), part[pos+1:])
+					if name in html.xmlns.charrefsByName:
+						node.append(html.xmlns.charrefsByName[name](), part[pos+1:])
+					elif name in xsc.xmlns.charrefsByName:
+						node.append(xsc.xmlns.charrefsByName[name](), part[pos+1:])
 						node.append("&", part)
 				else: # numeric entity
 		for (attrname, attrvalue) in attrs:
 			attrname = attrname.lower()
 			element = html.xmlns.elementsByName[name]
-			if element.isallowedattr(attrname):
+			if attrname in element.Attrs._handlersByXMLName:
 				newattrs[attrname] = attrvalue
 				errors.warn(errors.IllegalAttrError(element.Attrs, attrname))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.