?

Log in

No account? Create an account
 

Bug report: post by email with quotes in filename

About  

Previous Entry Bug report: post by email with quotes in filename Aug. 21st, 2004 @ 01:11 am Next Entry
I posted by email an image whose filename contained a single quote. The filename was, as expected, used as the alt text for the image, but the single quote broke the markup because single quotes were used within the IMG tag:

[Error: Irreparable invalid markup ('<img history-bat_26jul04.jpg'>') in entry. Owner must fix manually. Raw contents below.]

<img src='http://pics.livejournal.com/cmshaw/pic/00009xgq/s320x240' alt='nat'l history-bat_26Jul04.jpg' border='0'>

ETA: "nat'l history-bat_26Jul04.jpg" is a perfectly valid filename in Palm OS 5, which is what I'm using to test post by email imanges. My suggestion would be to strip single quotes out of the filenames before using them as alt text.
Leave a comment
[User Picture Icon]
From:darkcryst
Date:August 20th, 2004 10:38 pm (UTC)
(Link)
that would be because its invalid code?

if you use single quotes in a attribute then you must enclose with double quotes. In fact in XHTML you HAVE to use double quotes...

I'd call that more expected behavior...
[User Picture Icon]
From:cmshaw
Date:August 21st, 2004 08:53 am (UTC)
(Link)
that would be because its invalid code?

It's invalid code that was generated by the post-by-email interface, which is why I'm reporting it as a post-by-email bug.
[User Picture Icon]
From:darkcryst
Date:August 21st, 2004 08:54 am (UTC)
(Link)
ahhhh... I see. Sorry that wasn't clear so I responded like that.

In my defence - it was late at night ;)
[User Picture Icon]
From:cmshaw
Date:August 21st, 2004 08:56 am (UTC)
(Link)
In my defence - it was late at night ;)

Indeed it was! ;)
[User Picture Icon]
From:johno
Date:August 20th, 2004 11:00 pm (UTC)
(Link)
It's the "s320x240'" portion of the filename, which is a known bug.

This is why we are the beta testers.
[User Picture Icon]
From:cmshaw
Date:August 21st, 2004 08:54 am (UTC)
(Link)
It's the "s320x240'" portion of the filename, which is a known bug.

Yes -- I'm the one who reported that bug. :) This is a second bug.
[User Picture Icon]
From:kunzite1
Date:August 21st, 2004 12:09 am (UTC)

(Link)
the other posters must be on crack or something...

alt='nat'l history-bat_26Jul04.jpg' is invalid code because the alt tag is rendered as nat and l history-bat_26Jul04.jpg' is essentially junk.
[User Picture Icon]
From:cmshaw
Date:August 21st, 2004 08:50 am (UTC)
(Link)
Thank you! :)

Unfortunately, "nat'l history-bat_26Jul04.jpg" is a perfectly valid filename in Palm OS 5, which is what I'm using to test post by email imanges. My suggestion would be to strip single quotes out of the filenames before using them as alt text.
[User Picture Icon]
From:kunzite1
Date:August 21st, 2004 08:52 am (UTC)

(Link)
i agree with your idea.

when creating alt tags for the images, if there are single quotes (') they should either be removed or escaped.
(Leave a comment)
Top of Page Powered by LiveJournal.com