rm ([personal profile] rm) wrote2009-03-31 12:21 pm

HTML question

- Freaky control characters showing up in Firefox on Macs.
- They show up on nothing else -- not in Safari, not on PCs.

What the hell should I be looking for that will make this stop?

[identity profile] rm.livejournal.com 2009-03-31 04:26 pm (UTC)(link)
No, but looking at the page source I had a thought.

ampersands. ampersands as regular text. could they be triggering it?
ext_3685: Stylized electric-blue teapot, with blue text caption "Brewster North" (Default)

[identity profile] brewsternorth.livejournal.com 2009-03-31 04:27 pm (UTC)(link)
As opposed to ampersand-amp-semicolon? I don't know, maybe?

[identity profile] rm.livejournal.com 2009-03-31 04:30 pm (UTC)(link)
Yeah.

I've never had to deal with that before. How do I do code for just plain old ampersand?

I bet that will fix a chunk of 'em.
ext_3685: Stylized electric-blue teapot, with blue text caption "Brewster North" (Default)

[identity profile] brewsternorth.livejournal.com 2009-03-31 04:33 pm (UTC)(link)
The XML code is certainly & (& amp ;).

[identity profile] rm.livejournal.com 2009-03-31 04:34 pm (UTC)(link)
Okay. This is me again, super not getting this.

I know you just made a clever joke.

But I do not understand it.

If I want the screen to display: &

Do I just type a: &

Or do I type something else?
dipping_sauce: (Default)

[personal profile] dipping_sauce 2009-03-31 06:00 pm (UTC)(link)
It's preferable to type & amp ; (without the spaces).

[identity profile] dsmoen.livejournal.com 2009-04-01 06:53 am (UTC)(link)
Ampersands need to be encoded. & amp ; (without the spaces) is syntactically correct in ANY form of HTML. Ampersand alone never has been.

[identity profile] filkerdave.livejournal.com 2009-03-31 04:34 pm (UTC)(link)
& should give you the & safely.
ext_3685: Stylized electric-blue teapot, with blue text caption "Brewster North" (Default)

[identity profile] brewsternorth.livejournal.com 2009-03-31 04:37 pm (UTC)(link)
...yeah, I don't know enough HTML to show up the XML code without LJ automatically parsing it into the entity it should be. D'oh!

[identity profile] misch.livejournal.com 2009-03-31 04:49 pm (UTC)(link)
There isn't a good way to do that.

&lt; for <
&gt; for >

[identity profile] filkerdave.livejournal.com 2009-03-31 04:38 pm (UTC)(link)
De rien :)
marcmagus: Me playing cribbage in regency attire (Default)

[personal profile] marcmagus 2009-03-31 04:41 pm (UTC)(link)
Bare ampersands could *easily* be causing problems with some browsers. They're not allowed by the specification, but many browsers will make a guess and render them anyway. (I think often weird HTML problems that only occur on some browsers are because there's something wrong with your source and the popular browsers are made to make guesses in those situations so the page will render, even though it's wrong.)

If you ever want me to test things in FF, links, and/or lynx on Linux, I'd be happy to, btw.