WAT extractor: do not extract page title from embedded SVG images#37
Merged
Merged
Conversation
- add unit test that correct title is extracted from a document which includes an embedded SVG image containing a title element - extend existing unit tests to test for proper title extraction
- do not use <title> elements embedded in <svg> as page/document title - use the first non-empty <title> element to set the page/document title. This is required for documents where the <title> is not enclosed in the <head> element. Note: HTML5 allows the <head> element to be ommitted, see https://www.w3.org/TR/2011/WD-html5-20110525/syntax.html#optional-tags - overwrite the page/document title by the content of a <title> element inside the <head> element - for text extraction: define the title element as block element
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #36:
<title>elements embedded in<svg>as page/document title<title>element to set the page/document title. This is required for documents where the<title>is not enclosed in the<head>element.Note: HTML5 allows the
<head>element to be ommitted, see https://www.w3.org/TR/2011/WD-html5-20110525/syntax.html#optional-tags<title>element inside the<head>element