edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] fixing my semantics a little
Date: Tue, 12 Jan 2016 22:13:42 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1601122206020.29576@carhart.net> (raw)
In-Reply-To: <alpine.LRH.2.03.1601122147530.29576@carhart.net>



Sorry, I think my use of "literal" is backwards but I hope you can tell 
what I meant from context.  It's this whole cluster of questions around an 
actual token with a formal meaning, versus that thing appearing as part of 
a string.   Or in this case, something potentially with a formal meaning 
like <, only it isn't a piece of an HTML tag, it's expression criteria 
intended to be matched, delimited not by quotes but by slashes.  And the 
parser may not have enough information to differentiate between the 
situations.


On Tue, 12 Jan 2016, Kevin Carhart wrote:

>
> I was trying to dig into this problem where Sebastian from the commandline 
> list was trying to read google groups with edbrowse.
>
> There may be a few things going on with google groups, but one of them that 
> I could isolate as a short example is that they make use of the inline 
> regular expression style as follows:
>
> <script type="text/javascript">
> ua=/</g;va=/>/g;
> </script>
>
> And the routine fails because the expression criteria is taken as a literal, 
> so the error is then "SyntaxError: unterminated regular expressionliteral"
>
> I know this is very similar to the string contents interpreted as literals 
> problems from months back, which is now fixed, right?  Maybe this one is 
> harder to deal with because it isn't delimited by quotes?  It gets ambiguous 
> to know what /</ means.
> Or should this work?
> Or is it slipping my mind and we talked about the regex syntax back when we 
> talked about things like
> document.writeln("<script language=JavaScript>document.writeln('Subject: 
> ');<" + "/script>");
>
>
> Note, I made sure my tidy was up to date before trying this.  When I say:
> tidy -v
> I get
> HTML Tidy for Linux version 5.1.33
>
> Any idea what can be done here?
> thanks
> Kevin
>

--------
Kevin Carhart * 415 225 5306 * The Ten Ninety Nihilists

  reply	other threads:[~2016-01-13  6:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  6:01 [Edbrowse-dev] regex criteria interpreted as literals Kevin Carhart
2016-01-13  6:13 ` Kevin Carhart [this message]
2016-01-13 11:34 ` Chris Brannon
2016-01-14  2:28   ` Kevin Carhart
2016-01-15 21:38     ` [Edbrowse-dev] Tidy and various tags was " Chris Brannon
2016-01-15 21:46       ` [Edbrowse-dev] Tidy and various tags was regex criteria Karl Dahlke

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=alpine.LRH.2.03.1601122206020.29576@carhart.net \
    --to=kevin@carhart.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).