Skip to content

Commit 8ecbaa9

Browse files
rolandshoemakergopherbot
authored andcommitted
html: don't adjust xml:base
Change-Id: Ifac8571bedbb153b7e97ce2d2af47b5bc05b381c Reviewed-on: https://go-review.googlesource.com/c/net/+/781893 LUCI-TryBot-Result: [email protected] <[email protected]> Auto-Submit: Roland Shoemaker <[email protected]> Reviewed-by: Nicholas Husin <[email protected]> Reviewed-by: Nicholas Husin <[email protected]>
1 parent 8ae811a commit 8ecbaa9

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

‎html/foreign.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func adjustForeignAttributes(aa []Attribute) {
2323
}
2424
switch a.Key {
2525
case "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show",
26-
"xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "xmlns:xlink":
26+
"xlink:title", "xlink:type", "xml:lang", "xml:space", "xmlns:xlink":
2727
j := strings.Index(a.Key, ":")
2828
aa[i].Namespace = a.Key[:j]
2929
aa[i].Key = a.Key[j+1:]

‎html/parse_test.go‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ func (a sortedAttributes) Len() int {
152152
}
153153

154154
func (a sortedAttributes) Less(i, j int) bool {
155-
if a[i].Namespace != a[j].Namespace {
156-
return a[i].Namespace < a[j].Namespace
157-
}
158155
return a[i].Key < a[j].Key
159156
}
160157

@@ -245,10 +242,6 @@ func dump(n *Node) (string, error) {
245242
var testDataDirs = []string{"testdata/html5lib-tests/tree-construction/", "testdata/go/"}
246243

247244
func TestParser(t *testing.T) {
248-
skipTests := map[string]bool{
249-
"testdata/html5lib-tests/tree-construction/webkit02.dat/22": true, // xml attribute sort & replace
250-
}
251-
252245
for _, testDataDir := range testDataDirs {
253246
testFiles, err := filepath.Glob(testDataDir + "*.dat")
254247
if err != nil {
@@ -276,10 +269,6 @@ func TestParser(t *testing.T) {
276269

277270
testId := fmt.Sprintf("%s/%d", strings.ReplaceAll(tf, string(os.PathSeparator), "/"), i)
278271
t.Run(testId, func(t *testing.T) {
279-
if skipTests[testId] {
280-
t.Skip("Skipping known broken test")
281-
}
282-
283272
err = testParseCase(ta.text, ta.want, ta.context, ParseOptionEnableScripting(ta.scripting))
284273
if err != nil {
285274
t.Errorf("%s test #%d %q, %s", tf, i, ta.text, err)

0 commit comments

Comments
 (0)