Loading ...
Sorry, an error occurred while loading the content.
 

Re: [NH] &

Expand Messages
  • John Zeman
    Why do so much work when you can set the following tidy config file option to: Quote-ampersand: yes And tidy will automatically convert all & to & I also
    Message 1 of 19 , May 3 3:56 PM
      Why do so much work when you can set the following tidy config file
      option to:

      Quote-ampersand: yes

      And tidy will automatically convert all & to &

      I also have tidy set to convert all double " to " with this
      option.

      Quote-marks: yes

      Note that it only converts " that are not part of the HTML code.

      John
    • Jody
      Hi John, Because it is so much easier to use Search Disk and change what needs to be changed. Loading each file would take forever. If I want to do a quickie
      Message 2 of 19 , May 3 8:47 PM
        Hi John,

        Because it is so much easier to use Search Disk and change what
        needs to be changed. Loading each file would take forever. If I
        want to do a quickie on a file, I normally just select the "&"
        and do a Doc to HTML >> No Paragraph tags or the middle one.

        I don't care a whole lot for tidy. Tried it for a long time doing
        different things, but ended up using Clips, NoteTab's Doc to
        HTML, Search Disk, and other NoteTab tools. To each their own. ;)
        Thanks for the suggestion though!

        I definitely don't do quote marks. Cannot stand all that code in
        my HTML. I like to be able to read it. <g>

        >Why do so much work when you can set the following tidy config file
        >option to:
        >
        >Quote-ampersand: yes
        >
        >And tidy will automatically convert all & to &
        >
        >I also have tidy set to convert all double " to " with this
        >option.
        >
        >Quote-marks: yes
        >
        >Note that it only converts " that are not part of the HTML code.
        >
        >John
        >
        >
        >
        >
        >Yahoo! Groups Links
        >
        >
        >
        >


        Happy html'n!
        Jody

        mailto:ntb-html-UnSubscribe@yahoogroups.com
        http://groups.yahoo.com/group/ntb-html
        www.notetab.net www.clean-funnies.com
      • Kathy Jungjohann
        Dear Jody, Just read these posts, and I m not at all convinced that & should be changed to & in a url. I use a lot of links from AP and major newspapers in
        Message 3 of 19 , May 6 5:31 AM
          Dear Jody,
          Just read these posts, and I'm not at all convinced that & should be
          changed to & in a url. I use a lot of links from AP and major
          newspapers in our pages and they all use & in the url without a problem. In
          fact, I get "page cannot be not displayed" when I replaced & in one of the
          links as a test.
          Cheers,
          Kathy

          At 04:17 PM 5/3/2004 -0500, you wrote:
          >Hi All,
          >
          >Idiot question of the day...
          >
          >CSE HTML Validator tells me that & should be changed to & in a like like:
          >
          ><a href="http://www.fookes.com/regnow.html?2448&item=home">Fookes Software
          >Home</a>
          > ^
          >Is it telling me the truth? :)
          >
          >Take care,
          >Jody Adair
          >
          >The whole world doth err save you and me,
          > and even thou doest err some!
          > http://clean-funnies.com
          > http://notetab.net, http://fookes.us
          >
          >
          >
          >
          >
          >Yahoo! Groups Links
          >
          >
          >
          >
        • Rudolf Horbas
          Kathy, ... You re supposed to put the & into Your HTML, not into Your address bar (is that what You were doing?), where it will be interpreted al a literal
          Message 4 of 19 , May 6 7:43 AM
            Kathy,

            > Just read these posts, and I'm not at all convinced that & should be
            > changed to & in a url. I use a lot of links from AP and major
            > newspapers in our pages and they all use & in the url without a problem. In
            > fact, I get "page cannot be not displayed" when I replaced & in one of the
            > links as a test.

            You're supposed to put the & into Your HTML, not into Your address
            bar (is that what You were doing?), where it will be interpreted al a
            literal & and not as a further argument separator (hence the "cannot
            be displayed").

            If You click on a link like

            <a href="foo.php?bar=1&baz=2">Link with &&amp;</a>

            the result wil be the same as

            <a href="foo.php?bar=1&baz=2">Link with &</a>

            but in case 1 the validator won't whine about the character.

            Rudi
          • Kathy Jungjohann
            ... Rudi, You re right: I had typed it straight into the address bar. I see when I put the entity in the url of a link, it does convert ok. My mistake. (But
            Message 5 of 19 , May 6 8:47 AM
              >You're supposed to put the & into Your HTML, not into Your address
              >bar (is that what You were doing?)
              Rudi,
              You're right: I had typed it straight into the address bar.
              I see when I put the entity in the url of a link, it does convert ok.
              My mistake. (But I'll stick to plain old & in links just the same.)
              Kathy
            • John Zeman
              ... address ... ok. ... I ve never read the *official* reason why certain characters such as & should be converted, but I know in many programming languages &
              Message 6 of 19 , May 6 9:31 AM
                --- In ntb-html@yahoogroups.com, Kathy Jungjohann <kjj@a...> wrote:
                >
                > >You're supposed to put the & into Your HTML, not into Your
                address
                > >bar (is that what You were doing?)
                > Rudi,
                > You're right: I had typed it straight into the address bar.
                > I see when I put the entity in the url of a link, it does convert
                ok.
                > My mistake. (But I'll stick to plain old & in links just the same.)
                > Kathy


                I've never read the *official* reason why certain characters such as
                & should be converted, but I know in many programming languages & is
                a command. And when & is used as anything other than a command the
                script fails unless the & has been escaped.

                Basically, that's what the & is, a safe way to use & in your html
                even though all the browsers I'm aware of will display it either way.

                Besides & I also convert non breaking spaces, single, and double
                quotes. It may not be necessary but it makes it easy for me to
                differentiate the html code from the plain text in the document.

                John
              • John Zeman
                ... I know in many programming languages & is ... A slight correction to my previous post. & Is not a command in many other languages, it s used to group
                Message 7 of 19 , May 6 9:50 AM
                  --- In ntb-html@yahoogroups.com, "John Zeman" <john041650@y...> wrote:
                  I know in many programming languages & is
                  > a command. And when & is used as anything other than a command the
                  > script fails unless the & has been escaped.


                  A slight correction to my previous post.

                  & Is not a command in many other languages, it's used to group
                  commands in many other languages. To run one command and then
                  another.

                  John
                • Jody
                  Hi John ... "e;non breaking spaces"e; or only in urls and such? (I just guessed at the "e;.) Take care, Jody Adair The whole world doth
                  Message 8 of 19 , May 6 9:52 AM
                    Hi John

                    >Besides & I also convert non breaking spaces, single, and double
                    >quotes. It may not be necessary but it makes it easy for me to
                    >differentiate the html code from the plain text in the document.

                    >Does that mean that you would convert "non breaking spaces" into

                    "e;non breaking spaces"e;

                    or only in urls and such? (I just guessed at the "e;.)


                    Take care,
                    Jody Adair

                    The whole world doth err save you and me,
                    and even thou doest err some!
                    http://clean-funnies.com
                    http://notetab.net, http://fookes.us
                  • Don - htmlfixit.com
                    ... Then your pages will be non-compliant with standards if you care. It is better to do as they suggest and use the character entity so you generate
                    Message 9 of 19 , May 6 10:13 AM
                      Kathy Jungjohann wrote:

                      >>You're supposed to put the & into Your HTML, not into Your address
                      >>bar (is that what You were doing?)
                      >
                      > Rudi,
                      > You're right: I had typed it straight into the address bar.
                      > I see when I put the entity in the url of a link, it does convert ok.
                      > My mistake. (But I'll stick to plain old & in links just the same.)
                      > Kathy
                      >

                      Then your pages will be non-compliant with standards if you care. It is
                      better to do as they suggest and use the character entity so you
                      generate validated pages.
                    • sisterscape
                      ... I never gave this a second thought until validation became important for me. Now I would never think of publishing an unvalidated page!
                      Message 10 of 19 , May 6 10:28 AM
                        --- "Don - htmlfixit.com" <don@...> wrote:
                        > Kathy Jungjohann wrote:

                        > > (But I'll stick to plain old & in links just the same.)
                        > > Kathy
                        > >
                        >
                        > Then your pages will be non-compliant with standards if you care. It
                        > is better to do as they suggest and use the character entity so you
                        > generate validated pages.
                        >
                        I never gave this a second thought until validation became important
                        for me. Now I would never think of publishing an unvalidated page!




                        __________________________________
                        Do you Yahoo!?
                        Win a $20,000 Career Makeover at Yahoo! HotJobs
                        http://hotjobs.sweepstakes.yahoo.com/careermakeover
                      • John Zeman
                        ... Not quite Jody. in html extra (more than one) spaces are ignored by the browser, that s why you can indent your code if you want. To force extra spaces to
                        Message 11 of 19 , May 6 11:11 AM
                          --- In ntb-html@yahoogroups.com, Jody <kjv-av1611@e...> wrote:
                          > Hi John
                          >
                          > >Besides & I also convert non breaking spaces, single, and double
                          > >quotes. It may not be necessary but it makes it easy for me to
                          > >differentiate the html code from the plain text in the document.
                          >
                          > >Does that mean that you would convert "non breaking spaces" into
                          >
                          > "e;non breaking spaces"e;
                          >
                          > or only in urls and such? (I just guessed at the "e;.)
                          >
                          >


                          Not quite Jody. in html extra (more than one) spaces are ignored by
                          the browser, that's why you can indent your code if you want. To
                          force extra spaces to be displayed in the text, you need to use
                            in place of, or along with, regular spaces. In your example,
                          unless you had non breaking spaces in place of regular spaces, it
                          would be converted as follows:

                          Does that mean that you would convert "non breaking spaces"
                          into

                          Only the quotes are converted.

                          You can't have spaces in URLS so there's no reason to use non
                          breaking spaces in links. Non breaking spaces only apply to plain
                          text. To see a good example of it, just use the NoteTab command
                          of "modify document to html with paragraph tags" on a text document
                          that has two or more spaces between sentences.

                          John
                        • Jody
                          Hi John, ... Yes, I was just curious if you did the whole document literally. ... %20 :) ... Yep. I have two Clips I use a lot: H=   1 Space  
                          Message 12 of 19 , May 6 11:45 AM
                            Hi John,

                            >> >Does that mean that you would convert "non breaking spaces" into
                            >>
                            >> "e;non breaking spaces"e;
                            >>
                            >> or only in urls and such? (I just guessed at the "e;.)
                            >
                            >Not quite Jody. in html extra (more than one) spaces are ignored by
                            >the browser, that's why you can indent your code if you want.

                            Yes, I was just curious if you did the whole document literally.

                            >You can't have spaces in URLS so there's no reason to use non
                            >breaking spaces in links.

                            %20 :)

                            >Non breaking spaces only apply to plain text. To see a good
                            >example of it, just use the NoteTab command of "modify document
                            >to html with paragraph tags" on a text document that has two or
                            >more spaces between sentences.

                            Yep. I have two Clips I use a lot:

                            H="  1 Space"
                             

                            H="  5 Spaces"
                                 

                            Sometimes I use the menu; just depends on where I'm at, but I can
                            get to most of my frequent Clips as fast as I can to the menu and
                            don't take the chance of my mouse pointer sliding off and having
                            to start again because it collapses.

                            I just added this clip :)

                            H=Fill Spaces with  
                            ^$StrFill(" ";^$GetSelSize$)$

                            bcnu,
                            jody

                            I can only please one person a day.
                            Today is obviously not your day.
                            Tomorrow doesn't look good either. 8D
                            http://www.clean-funnies.com
                            http://www.fookes.com/regnow.html?2448 ;)
                            http://www.sojourner.us/software
                          • John Zeman
                            ... by ... That s true Jody, if someone attempts to use spaces in a URL they should be changed to %20 instead. One thing you may want to keep in mind when
                            Message 13 of 19 , May 6 1:08 PM
                              --- In ntb-html@yahoogroups.com, Jody <kjv-av1611@e...> wrote:
                              > Hi John,
                              >
                              > >> >Does that mean that you would convert "non breaking spaces" into
                              > >>
                              > >> "e;non breaking spaces"e;
                              > >>
                              > >> or only in urls and such? (I just guessed at the "e;.)
                              > >
                              > >Not quite Jody. in html extra (more than one) spaces are ignored
                              by
                              > >the browser, that's why you can indent your code if you want.
                              >
                              > Yes, I was just curious if you did the whole document literally.
                              >
                              > >You can't have spaces in URLS so there's no reason to use non
                              > >breaking spaces in links.
                              >
                              > %20 :)
                              >
                              > >Non breaking spaces only apply to plain text. To see a good
                              > >example of it, just use the NoteTab command of "modify document
                              > >to html with paragraph tags" on a text document that has two or
                              > >more spaces between sentences.
                              >
                              > Yep. I have two Clips I use a lot:
                              >
                              > H="  1 Space"
                              >  
                              >
                              > H="  5 Spaces"
                              >      
                              >
                              > Sometimes I use the menu; just depends on where I'm at, but I can
                              > get to most of my frequent Clips as fast as I can to the menu and
                              > don't take the chance of my mouse pointer sliding off and having
                              > to start again because it collapses.
                              >
                              > I just added this clip :)
                              >
                              > H=Fill Spaces with  
                              > ^$StrFill(" ";^$GetSelSize$)$
                              >
                              > bcnu,
                              > jody
                              >


                              That's true Jody, if someone attempts to use spaces in a URL they
                              should be changed to %20 instead.

                              One thing you may want to keep in mind when using non breaking
                              spaces, is they mean just what their name implies. They're meant to
                              keep text together on one line. So as a general rule if you're going
                              to display a long string of spaces, you may want to consider
                              alternating between regular spaces and non breaking ones. e.g.

                                       

                              instead of:

                                       

                              Doing it the first way will allow line breaks to take place at proper
                              points when the page is viewed in a smaller window.

                              John
                            • Jody
                              Hi John, I suppose           w/o breaking them could be one of the reasons for getting the horizontal scrollbar.
                              Message 14 of 19 , May 6 1:31 PM
                                Hi John,

                                I suppose          
                                w/o breaking them could be one of the reasons for getting the
                                horizontal scrollbar. (I hate finding those problems in my code.)
                                I know images can do it, bad code,... but I haven't found other
                                reasons (at least that I can remember) other than some table and
                                margin-left/right in css and width sometimes. I have a few pages
                                somewhere <g> that has the horizontal bar just for about 1/2" and
                                cannot figure out what is causing it. None of the above seems to.
                                Feel free to change the Subject to Unwanted Horizontal Scrollbar
                                if you want to offer suggestions (off the top of your head)
                                because I'd have to go searching for the pages to send a link in.

                                >One thing you may want to keep in mind when using non breaking
                                >spaces, is they mean just what their name implies. They're meant to
                                >keep text together on one line. So as a general rule if you're going
                                >to display a long string of spaces, you may want to consider
                                >alternating between regular spaces and non breaking ones. e.g.
                                >
                                >         
                                >
                                >instead of:
                                >
                                >         
                                >
                                >Doing it the first way will allow line breaks to take place at proper
                                >points when the page is viewed in a smaller window.


                                I've got Fookesability!
                                Sometimes, no sensibility. :(
                                Jody

                                fookes.us, notetab.net
                                clean-funnies.com, bwbc.us
                                sureword.net, sojourner.us
                              • Marcelo de Castro Bastos
                                ... &, are reserved characters in HTML. This means that they should be used ONLY for marking elements ( ) or entities (&). This way, the browser
                                Message 15 of 19 , May 6 4:06 PM
                                  On 6/5/2004 13:31, John Zeman invited the wrath of the gods by saying:

                                  > I've never read the *official* reason why certain characters such as
                                  >
                                  >& should be converted, but I know in many programming languages & is
                                  >a command. And when & is used as anything other than a command the
                                  >script fails unless the & has been escaped.
                                  >
                                  >Basically, that's what the & is, a safe way to use & in your html
                                  >even though all the browsers I'm aware of will display it either way.
                                  >
                                  >Besides & I also convert non breaking spaces, single, and double
                                  >quotes. It may not be necessary but it makes it easy for me to
                                  >differentiate the html code from the plain text in the document.
                                  >
                                  >
                                  >
                                  &, < and > are "reserved" characters in HTML. This means that they
                                  should be used ONLY for marking elements (<>) or entities (&). This way,
                                  the browser parser won't have to "guess" if you are using them for other
                                  things.

                                  That means: the ONLY syntactically-allowed way to use "&" in HTML is as
                                  the prefix for an entity. So, if you WANT and "&" there, you have to use
                                  the equivalent entity instead.

                                  Since there are a LOT of badly-coded pages out there, in practice
                                  browsers have additional code to try and "guess" what to do when they
                                  find things that aren't standard HTML. That's why you find sites with
                                  unescaped "&" in the middle of the code, or unterminated entities, and
                                  it still displays as intended. But you shouldn't trust on the browser
                                  guesses; you should try to create syntactically-valid HTML instead.

                                  Double-quotes (") used to be considered reserved too, but this is no
                                  longer true. You may prefer leaving them as entities for the reason you
                                  mentioned (easier to separate them from the code), but it's not
                                  necessary to validate. Single-quotes were never reserved, so the same
                                  applies. OTOH, if there are a LOT of quotes in the text (for instance, a
                                  dialogue), converting them into entities will make your pages a bit larger.


                                  --
                                  Marcelo de Castro Bastos

                                  -=-=-
                                  ... No one is listening until you make a mistake.
                                  * TagZilla 0.049
                                • John Zeman
                                  ... way, ... other ... That makes perfect sense Marcelo, and I should have realized it. Every other language I work with has reserved characters, that s what I
                                  Message 16 of 19 , May 6 4:45 PM
                                    --- In ntb-html@yahoogroups.com, Marcelo de Castro Bastos
                                    <mcblista@t...> wrote:

                                    > &, < and > are "reserved" characters in HTML. This means that they
                                    > should be used ONLY for marking elements (<>) or entities (&). This
                                    way,
                                    > the browser parser won't have to "guess" if you are using them for
                                    other
                                    > things.
                                    >


                                    That makes perfect sense Marcelo, and I should have realized it.
                                    Every other language I work with has reserved characters, that's what
                                    I was kinda sorta alluding to earlier.

                                    I was just having a brain hiccup as to what they're called in html.

                                    Thanks for the refresher.

                                    John
                                  Your message has been successfully submitted and would be delivered to recipients shortly.