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

Adguard cannot detect HTML if there is an xml declaration at the document start #1011

Closed
Alex-302 opened this Issue Apr 3, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@Alex-302
Member

Alex-302 commented Apr 3, 2016

Example:
view-source:http://objectiv.tv/

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" >

@Alex-302 Alex-302 added the bug label Apr 3, 2016

@Alex-302 Alex-302 added this to the 6.1 milestone Apr 3, 2016

@ameshkov ameshkov modified the milestones: 6.0 R2, 6.1 Apr 4, 2016

@ameshkov ameshkov changed the title from objectiv.tv - Adguard doesn't injects to the page(html is not detected) to Adguard cannot detect HTML if there is <?xml> prefix Apr 4, 2016

@ameshkov ameshkov changed the title from Adguard cannot detect HTML if there is <?xml> prefix to Adguard cannot detect HTML if there is an xml declaration at the document start Apr 4, 2016

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 5, 2016

Member

According to https://xmlwriter.net/xml_guide/xml_declaration.shtml:

If the XML declaration is included, it must be situated at the first position of the first line in the XML documentwell-formedness constraint.

So we can simply check the very first bytes and skip xml declaration if it is present.

Member

ameshkov commented Apr 5, 2016

According to https://xmlwriter.net/xml_guide/xml_declaration.shtml:

If the XML declaration is included, it must be situated at the first position of the first line in the XML documentwell-formedness constraint.

So we can simply check the very first bytes and skip xml declaration if it is present.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 5, 2016

Member

Fixed.

Review ID:
CR-AG-745

Member

ameshkov commented Apr 5, 2016

Fixed.

Review ID:
CR-AG-745

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 18, 2016

Member

Did not fixed for oper.ru

Member

ameshkov commented Apr 18, 2016

Did not fixed for oper.ru

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Apr 18, 2016

Member

Fixed it:
CR-AG-759

Member

ameshkov commented Apr 18, 2016

Fixed it:
CR-AG-759

@ameshkov ameshkov closed this Apr 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment