On Monday, April 22, 2013 3:16:26 PM UTC-4, San wrote:
>
> However, in some constructions involving apparently nested angle brackets
> < < >, I'm having a small problem with BBEdit warning of what I call "faux
> errors." For example, I might have code like this in my HTML page:
>
> <a href = <?php createURL("myKeyword") ?> > Lots of link text, image code,
> etc. here </a>
>
> ...and invoking BBEdit's validator on the HTML page will result in two
> errors:
>
> Error: File foobar.html, line 167:
> Unencoded entity found; “<” needs to be encoded as “<”.
> Error: File foobar.html, line 167:
> Close element “</a>” found but element wasn't open.
>
> It's perfectly understandable why BBEdit sees these as HTML errors, but in
> fact once the PHP is done processing the page, the resultant HTML will be
> well-formed with a valid link.
>
Actually, no. The result is not, strictly speaking, well-formed. A
well-formed href attribute has no spaces around the "=" and has quotes
(single or double) around the URL. So, if you instead try this:
<a href="<?php createURL('myKeyword') ?>"> Lots of link text, image code,
etc. here </a>
it validates successfully. Of course, there will always be ways you can
trip up BBEdit's validation by inserting PHP code, but in this case there
is a workaround, which happens to produce HTML that is more valid anyway.
--
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.