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]   html parser and whitespace in tag names
Date: Wed, 28 Jan 2015 15:55:05 -0500	[thread overview]
Message-ID: <20150028155505.eklhad@comcast.net> (raw)

> <a href="some_url">
> <p>
> link text goes here.
> </p>
> </a>

Yes this did not work because I was trying to be clever.
Some tags in the text I thought should close the open anchor,
if there was an open anchor.
I was really thinking about this.

<P>
<A>
link text
</P>
</A>

Should the </P> close the anchor?
Does it really matter?

There's so much improper html out there it makes my head spin.
I tried to anticipate some of this and I think
I did more harm than good.
The latest push just comments out some code,
in html.c from 1810 to 1828.
#if 0
#endif
Code no longer being used.
I didn't delete the code cause I don't know
maybe it still might be used in some fashion.
If I think it's worthless in a couple months I'll delete it
and some other code that supports it.

All this makes me wonder again if I should be parsing html at all,
or if there isn't some code out there that would do it for me,
and turn it into a tree of nodes, and I could just work with that.
Let somebody else worry about all this "is it nested properly" html crap.
Trying to leverage more open source libraries.
I was going to play with xidel but haven't got round to it.

Karl Dahlke

             reply	other threads:[~2015-01-28 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:55 Karl Dahlke [this message]
2015-01-29  8:22 ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2015-02-01 20:05 Karl Dahlke
2015-02-01 20:29 ` Chris Brannon
2015-01-29 13:24 Karl Dahlke
2015-02-01 19:56 ` Chris Brannon
2015-01-28 15:02 Karl Dahlke
2015-01-28 17:33 ` Adam Thompson
2015-01-28 12:16 Karl Dahlke
2015-01-28 13:08 ` Adam Thompson
2015-01-28 11:49 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=20150028155505.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).