Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Single quote a bad character?

Reply
Thread Tools

Single quote a bad character?

 
 
David Segall
Guest
Posts: n/a
 
      07-12-2009
When I validate a page in Dreamweaver it says " found between tags.
Consider using the equivalent entity (&amp = '&', &lt = '<', &gt =
'>', &quot = quotation mark)."

I am inclined to ignore it because I can't find a &xxx; to replace the
single quote and I think &#39 is harder to read. Am I wrong?

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      07-12-2009
David Segall wrote:

> When I validate a page in Dreamweaver


How do you do that? Has Dreamweaver got a validator, or a phoney
"validator"?

> it says "' found between tags.


If your quotation is correct, then the "validator" is really phoney.

It is certainly not invalid to use the Ascii apostrophe ' between tags.

> Consider using the equivalent entity (&amp = '&', &lt = '<', &gt =
> '>', &quot = quotation mark)."


More bogus. For robustness, the trailing semicolon should never be omitted.
And it does not mention the entity for apostrophe. Of course, there is no
good reason to use the entity, but the message suggests an entity.

> I am inclined to ignore it because I can't find a &xxx; to replace the
> single quote and I think &#39 is harder to read. Am I wrong?


Well, probably you are wrong, but this is somewhat complicated.

_If_ the message were justified, i.e. if the apostrophe were dangerous, then
you surely should not ignore it for reasons like lack of information or
difficulty of reading HTML source. The good reason to ignore the message is
that the apostrophe is in no way risky between tags.

On the other hand, is the Ascii apostrophe the correct character? Normally
it is the correct character in some formalisms only, like programming or
command languages, etc., not in human languages. The odds are that you
should be using the right single quotation mark, which is the preferred
character for punctuation apostrophe (in human languages), according to the
Unicode standard. If you don't know how to enter it in the declared
character encoding of your document, use the entity reference &rsquo;.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
 
David Segall
Guest
Posts: n/a
 
      07-12-2009
David Segall <(E-Mail Removed)> wrote:

>When I validate a page in Dreamweaver it says " found between tags.
>Consider using the equivalent entity (&amp = '&', &lt = '<', &gt =
>'>', &quot = quotation mark)."
>
>I am inclined to ignore it because I can't find a &xxx; to replace the
>single quote and I think &#39 is harder to read. Am I wrong?


I'm sorry. Jukka's response has made it clear that I did not provide
the appropriate information in my post. The single quote is actually
an apostrophe as in the second character of this post.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      07-12-2009
In article <(E-Mail Removed)>,
David Segall <(E-Mail Removed)> wrote:

> When I validate a page in Dreamweaver it says " found between tags.
> Consider using the equivalent


Should you have anything but spaces between tags in the sense of between
element ends and beginnings like <div></div> *** <div></div>? Are
comments typed correctly?

With anchors, there is <a href="URL"></a> and one can sometimes forget
to put in the second " around the URL or ditto for in inline styles
style="...">. Not sure if this would produce the DW flag though?

What does the FF validator say? With the Web developer extension, it now
has both validation for hosted files and local files.

--
dorayme
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      07-13-2009
dorayme wrote:

>> When I validate a page in Dreamweaver it says "' found between tags.
>> Consider using the equivalent

>
> Should you have anything but spaces between tags in the sense of
> between element ends and beginnings like <div></div> *** <div></div>?


Why would that matter, irrespectively of whether you actually mean here?

> Are comments typed correctly?


Why would that matter? The issue was the ' character between tags.

> With anchors, there is <a href="URL"></a> and one can sometimes forget
> to put in the second " around the URL or ditto for in inline styles
> style="...">.


Why would that matter? If you don't have a terminator for a quoted attribute
value like "URL" or 'URL', you probably generate a syntax error, but you
don't generate a syntax error consisting of an apostrophe character '
between tags.

An apostrophe, or any non-whitespace character, is a syntax error between
tags when the syntax does not allow character data in a particular context,
like inside the head element. It would however be grossly misleading to
refer to a specific character by name as causing the problem (like "letter K
not allowed") and outright wrong to suggest that turning it to an entity
reference could help.

> What does the FF validator say?


It's easier to use an online validator directly, for a specific page, that
via a function in an add-on to a specific browser. My favorite is
http://www.htmlhelp.com/tools/validator/ because the W3C validator seems to
be getting "enhanced" with new confusing "features".

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      07-13-2009
In article <(E-Mail Removed)>,
Ben C <(E-Mail Removed)> wrote:

> On 2009-07-12, dorayme <(E-Mail Removed)> wrote:
> > In article <(E-Mail Removed)>,
> > David Segall <(E-Mail Removed)> wrote:
> >
> >> When I validate a page in Dreamweaver it says " found between tags.
> >> Consider using the equivalent

> >
> > Should you have anything but spaces between tags in the sense of between
> > element ends and beginnings like <div></div> *** <div></div>? Are
> > comments typed correctly?

>
> This kind of thing is quite common, and perfectly OK:
>
> <div>Some words <span>here</span> and <span>there</span></div>
>
> "and" is between tags.


Yes, I was slack. Sorry everyone. I meant loose in body, everything else
not loose but in or between tags or comments. I was just musing aloud at
what might trigger DW to report (truthfully or falsely) what it did. In
conjunction with 4.01 Strict, my editor flags loose characters and it
might do so by mistake.

I would like to say it was a cunning plan to trigger JK to say more
about this because I know he knows all about these things. I did think
of him when typing my post and that maybe I should leave this one alone.
But David is a film buff and one likes to be a bit friendly, you know?
<g>.

I'll tell you the truth: I would like to get my hands on the mark up
that David got the message from DW about before I say a single thing
more. But he is scared about Siberian re-education camps at the moment,
so I am not sure of the chances.

--
dorayme
 
Reply With Quote
 
David Segall
Guest
Posts: n/a
 
      07-14-2009
dorayme <(E-Mail Removed)> wrote:

>I'll tell you the truth: I would like to get my hands on the mark up
>that David got the message from DW about before I say a single thing
>more. But he is scared about Siberian re-education camps at the moment,
>so I am not sure of the chances.


You are right. There is no way I am going to publish the real URL. The
client selected, and I used, a design from OSWD and even the liberals
here would crucify me because of it.

However, I could not resist the logic behind your request so I copied
the relevant mark up to <http://www.profectus.asia/Untitled-1.html>.
In doing so I discovered that, damn it!, Yukka was correct. I had
copied the text from a Word document the client gave me and it appears
that the apostrophe in the second sentence is a closing quote. When I
typed in a single quote, as in the first sentence, Dreamweaver did not
report an error.
 
Reply With Quote
 
Lars Eighner
Guest
Posts: n/a
 
      07-14-2009
In our last episode,
<(E-Mail Removed)>,
the lovely and talented David Segall
broadcast on alt.html:

> dorayme <(E-Mail Removed)> wrote:


>>I'll tell you the truth: I would like to get my hands on the mark up
>>that David got the message from DW about before I say a single thing
>>more. But he is scared about Siberian re-education camps at the moment,
>>so I am not sure of the chances.


> You are right. There is no way I am going to publish the real URL. The
> client selected, and I used, a design from OSWD


Overseas war department?
Outdoor sports with dildos?
Only slightly weather damaged?


--
Lars Eighner <http://larseighner.com/> September 5796, 1993
175 days since Rick Warren prayed over Bush's third term.
Obama: No hope, no change, more of the same. Yes, he can, but no, he won't.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      07-14-2009
In article <(E-Mail Removed)>,
David Segall <(E-Mail Removed)> wrote:

> dorayme <(E-Mail Removed)> wrote:
>
> >I'll tell you the truth: I would like to get my hands on the mark up
> >that David got the message from DW about before I say a single thing
> >more. But he is scared about Siberian re-education camps at the moment,
> >so I am not sure of the chances.

>
> You are right. There is no way I am going to publish the real URL. The
> client selected, and I used, a design from OSWD and even the liberals
> here would crucify me because of it.
>
> However, I could not resist the logic behind your request so I copied
> the relevant mark up to <http://www.profectus.asia/Untitled-1.html>.
> In doing so I discovered that, damn it!, Yukka was correct. I had
> copied the text from a Word document the client gave me and it appears
> that the apostrophe in the second sentence is a closing quote. When I
> typed in a single quote, as in the first sentence, Dreamweaver did not
> report an error.


Yes, I have grep pattern replacement I made to get rid of those pesky
things in my text editor and put in honest-to-goodness typewriter quotes.

Honest to goodness? Well, remember the scene in Witness where Harrison
Ford has just put on the Amish suit of Rachel's late husband? He asks
how does it look? And she says, approvingly, it looks plain. She means
unadorned. There is a funny exchange about why there are no buttons and
it turns out that buttons for the Amish are too proud.

Anyway, to cut a long story short, when I redo this perfect film (to
make HTML the background to the thriller and love story), I will do it
with Ford typing a fancy apostrophe, one of those that JK seems to love
so much, he being into the finer things in typography, and I will have
Rachel chiding him and changing it to plain typewriter.

--
dorayme
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      07-14-2009
In article <(E-Mail Removed)> ,
Lars Eighner <(E-Mail Removed)> wrote:

> In our last episode,
> <(E-Mail Removed)>,
> the lovely and talented David Segall
> broadcast on alt.html:
>
> > dorayme <(E-Mail Removed)> wrote:

>
> >>I'll tell you the truth: I would like to get my hands on the mark up
> >>that David got the message from DW about before I say a single thing
> >>more. But he is scared about Siberian re-education camps at the moment,
> >>so I am not sure of the chances.

>
> > You are right. There is no way I am going to publish the real URL. The
> > client selected, and I used, a design from OSWD

>
> Overseas war department?
> Outdoor sports with dildos?
> Only slightly weather damaged?


Probably "Open Source Web Design"

--
dorayme
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with single-quote and double-quote when using subprocess. Evan Python 3 11-04-2008 12:24 PM
problem with quote and single-quote when using "subprocess" Evan Python 1 11-04-2008 12:08 AM
How to handling string contains single quote and double quote vikrant Perl Misc 8 05-17-2007 04:37 PM
Datagrid on load; replace all double single quote to single quote to display to user Eric Layman ASP .Net 3 04-14-2007 07:16 AM
Single Quote Versus Double Quote In A href link knee-dragger@hotmail.com HTML 3 06-13-2006 12:42 AM



Advertisments