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

fix serialization segfault #151

Merged
merged 6 commits into from
Jun 2, 2018
Merged

fix serialization segfault #151

merged 6 commits into from
Jun 2, 2018

Conversation

Azq2
Copy link
Contributor

@Azq2 Azq2 commented Jun 1, 2018

Fix segfault if doctype hasn't attribute

Azq2 added 6 commits June 2, 2018 01:09
Fix segfault if doctype hasn't attribute
whitespace after <!DOCTYPE required by spec
Implement missing serialization of:
- PUBLIC/SYSTEM
- systemId
- publicId
@Azq2
Copy link
Contributor Author

Azq2 commented Jun 2, 2018

@lexborisov i think its ready to merge

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
name: 'html'
publicId: '-//W3C//DTD XHTML 1.0 Strict//EN'
systemId: 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'

IN:  '<!DOCTYPE html>'
OUT: '<!DOCTYPE html>'
name: 'html'
publicId: ''
systemId: ''

IN:  '<!DOCTYPE html PUBLIC>'
OUT: '<!DOCTYPE html>'
name: 'html'
publicId: ''
systemId: ''

IN:  '<!DOCTYPE html SYSTEM>'
OUT: '<!DOCTYPE html>'
name: 'html'
publicId: ''
systemId: ''

IN:  '<!DOCTYPE html allala>'
OUT: '<!DOCTYPE html>'
name: 'html'
publicId: ''
systemId: ''

IN:  '<!DOCTYPE html "allala">'
OUT: '<!DOCTYPE html>'
name: 'html'
publicId: ''
systemId: ''

IN:  '<!doctype HTML system "about:legacy-compat">'
OUT: '<!DOCTYPE html SYSTEM "about:legacy-compat">'
name: 'html'
publicId: ''
systemId: 'about:legacy-compat'

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">'
name: 'html'
publicId: '-//W3C//DTD HTML 4.0//EN'
systemId: ''

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">'
name: 'html'
publicId: '-//W3C//DTD HTML 4.0//EN'
systemId: 'http://www.w3.org/TR/REC-html40/strict.dtd'

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">'
name: 'html'
publicId: '-//W3C//DTD HTML 4.01//EN'
systemId: ''

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'
name: 'html'
publicId: '-//W3C//DTD HTML 4.01//EN'
systemId: 'http://www.w3.org/TR/html4/strict.dtd'

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
name: 'html'
publicId: '-//W3C//DTD XHTML 1.0 Strict//EN'
systemId: 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'

IN:  '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
OUT: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
name: 'html'
publicId: '-//W3C//DTD XHTML 1.1//EN'
systemId: 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'

IN:  '<!DOCTYPE html SYSTEM "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
OUT: '<!DOCTYPE html SYSTEM "-//W3C//DTD XHTML 1.1//EN">'
name: 'html'
publicId: ''
systemId: '-//W3C//DTD XHTML 1.1//EN'

IN:  '<!DOCTYPE OlOlLo>'
OUT: '<!DOCTYPE olollo>'
name: 'olollo'
publicId: ''
systemId: ''

IN:  '<!DOCTYPE html PUBLIC "" "xxx">'
OUT: '<!DOCTYPE html SYSTEM "xxx">'
name: 'html'
publicId: ''
systemId: 'xxx'

IN:  '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">'
OUT: '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">'
name: 'svg:svg'
publicId: '-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN'
systemId: 'http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd'

@lexborisov lexborisov merged commit 0ade0e5 into lexborisov:master Jun 2, 2018
@lexborisov
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants