-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: report reserved string in XHTML custom attribute namespaces
EPUB 3.3 disallows "w3.org" and "idpf.org" in domains of XHTML custom attribute namespaces. Fix #1190
- Loading branch information
Showing
7 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/resources/epub3/files/content-document-xhtml/attrs-custom-ns-reserved-error.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Test</title> | ||
</head> | ||
<body w3:attr="disallowed" idpf:attr="disallowed" ok:attr="allowed" | ||
xmlns:w3="http://example.w3.org" xmlns:idpf="http://example.idpf.org" | ||
xmlns:ok="http://example.org/w3.org"> | ||
<h1>Test</h1> | ||
</body> | ||
</html> |
11 changes: 5 additions & 6 deletions
11
src/test/resources/epub3/files/content-document-xhtml/attrs-custom-ns-valid.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:foo="https://example.org" xml:lang="en" lang="en"> | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Attributes in custom namespace</title> | ||
<meta charset="utf-8" /> | ||
<title>Test</title> | ||
</head> | ||
<body> | ||
<body custom:attribute="allowed" xmlns:custom="http://example.org"> | ||
<h1>Test</h1> | ||
<p foo:bar1="baz" foo:bar2="baz" foo:bar3="baz">custom attribute!</p> | ||
</body> | ||
</html> |