edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev]     tidy debug tree, and a js script
Date: Sun, 30 Aug 2015 06:31:11 -0400	[thread overview]
Message-ID: <20150730063111.eklhad@comcast.net> (raw)
In-Reply-To: <20150830100239.GC17154@toaster.adamthompson.me.uk>

[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]

> Any chance you could have a go at converting some of the parsing logic

Wow - I'm good but not that good.
It's a pretty big project.
I don't want to move too slowly, having done almost nothing on edbrowse
in the past 6 months, but I don't want to run recklessly fast either.
Need to pass designs by you guys before coding etc.
And there are still some big questions to answer, like is tidy5
the right path, or perhaps libhubbub, which could be part
of a larger browser effort, larger than just parsing html.
netsurf-browser.org

I'm running another sanity check on tidy.
This generates an error because & is not escaped,
and yes it probably should be.
<A href="www.x.com/path?a=b&ccopy=d>
It even converts &copy into the copyright symbol,
now part of the url.

So ok, maybe I did a bad test because I'm not following spec
but the internet doesn't follow spec either, not all the time.
Look at the raw html from www.sciam.com
It contains these two lines, on the same home page.

<li><a href="https://www.scientificamerican.com/store/subscribe/scientific-american-all-access/?WT.mc_id=SA_Webstore_SCA_AllAccess_SubCenter&amp;responseKey=W3S03RD00" target="_blank">Subscribe to All Access <span class="red">&raquo;</span></a></li>
<li><a href="https://w1.buysub.com/servlet/OrdersGateway?cds_mag_code=SCA&cds_page_id=185258&cds_response_key=I5S03R00B" target="_blank">Subscribe to Print <span class="red">&raquo;</span></a></li>

The first one has & escaped, the second one does not.
So ok just wanted to make sure tidy is handling these two cases properly,
and it is.
Happily, my parser also handles these cases properly.
I must have run into this at some point.

I'll continue testing. Assuming I uncover no serious problems,
I think the next step is to enhance our edbrowse node, with enough attributes
to faithfully copy the information from a tidy node.
We have some of the attributs but not enough.
A blatent omission is a text string,
because we never represented text nodes before.
We'll need this, and child pointers,
and a list of attribute value pairs, and other things.
I'll post more on this later.

Karl Dahlke

  reply	other threads:[~2015-08-30 10:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-29 10:04 Karl Dahlke
2015-08-29 13:25 ` Adam Thompson
2015-08-29 14:36   ` Karl Dahlke
2015-08-29 14:58     ` Adam Thompson
2015-08-29 16:05       ` Karl Dahlke
2015-08-30  1:15         ` Kevin Carhart
2015-08-30  8:26         ` Adam Thompson
2015-08-30  9:30           ` Adam Thompson
2015-08-30  9:49             ` Karl Dahlke
2015-08-30 10:02               ` Adam Thompson
2015-08-30 10:31                 ` Karl Dahlke [this message]
2015-08-30 11:16                   ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150730063111.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).