edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] tidy debug tree, and a js script
Date: Sun, 30 Aug 2015 12:16:49 +0100	[thread overview]
Message-ID: <20150830111649.GD17154@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20150730063111.eklhad@comcast.net>

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

On Sun, Aug 30, 2015 at 06:31:11AM -0400, Karl Dahlke wrote:
> > 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 looked into libhubbub before going down the tidy5 route,
but it seems to have been sucked into netsurf fully now so I gave up on it.

> 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>
I suspect the error here is that we're missing the closing quote in this example actually.
> It even converts &copy into the copyright symbol,
> now part of the url.

Not sure about that, but this isn't a correct attribute anyways and I've never
seen this on the internet.

> 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.

Agreed about html not following spec;
that's why I wanted to get away from a home grown parser.

> 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.

Yeah, I think we'll need to revise our tag nodes signifficantly eventually,
but as a stop gap measure I was thinking to simply run through the tidy tree
and copy what we can into our existing structure.
It's far from perfect but we need to rewrite the DOM anyway at some stage.
That's going to be a really large project requiring a large set of changes to
how our tag system works. Thus I don't see the point in enhancing our existing
tags too much, though if it naturally heads towards a functional DOM
representation that's good with me.
At least this way we get more html support and probably get rid of some parsing issues into the bargain.

Cheers,
Adam.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-08-30 11:14 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
2015-08-30 11:16                   ` Adam Thompson [this message]

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=20150830111649.GD17154@toaster.adamthompson.me.uk \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    /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).