in reply to generating A NAME tags in HTML output

The 'name' attribute can only contain a very specific set of characters. The % sign is not one of them. The only place URI-escaping is appropriate is in URI attributes (e.g. 'src' and 'href'). See also:

Replies are listed 'Best First'.
Re: Re: generating A NAME tags in HTML output
by John M. Dlugosz (Monsignor) on Nov 26, 2001 at 05:32 UTC
    ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
    OK, assuming that the NAME in A NAME is a NAME token in SGML, that pretty much covers it.

    Thanks,

    —John

      ...may be followed by any number of letters...

      I assume that with "letters" you mean 'a' to 'z'? (There are many other characters that many, many people consider letters.)

      Update: That's when I finally read the post I answered. Doh! Me bad. Forget it.

      f--k the world!!!!
      /dev/world has reached maximal mount count, check forced.

        It uses plain ASCII characters, letter meaning [A-Za-z]. SGML, being 30 years old, obviously predates Unicode, and was contemporary with 7-bit character sets and bank-swapping concepts that grew into the horrible mess known as ISO-2022.

        I don't know if XML extends this, allowing other characters in "identifier" -like tokens. C and C++ lists all legal letters and idiographs in all character sets permitted in identifiers; I don't know if Perl references a formal standard, but it also allows Unicode characters in symbol names. I good first appoximation is to use the Unicode "properties" to pick letters, letter-like symbols, etc.

        —John