[RCD] Handling invalid address book entries
till
till at php.net
Thu Oct 16 21:04:36 CEST 2008
On Thu, Oct 16, 2008 at 8:18 PM, Ziba Scott <ziba at umich.edu> wrote:
> Hi,
>
> Thanks for the response. There is at least one real problem I think
> we're all agreeing on:
>
> Right now, if you put an apostrophe in the first or last name field of a
> contact and try and save it, mdb2 throws an error during prepare and the
> save fails. The quick solution may be to (as many people have
> reasonably suggested) just escape the sensitive characters.
Alec gave you the solution. It's called quoting data.
Another question is if we want to impose any rules on "validating"
email adresses, it's basically not one solution to a single problem.
Problem a: MDB2 error => Fix: quote data
Problem b: "invalid" chars in an email address => Fix: the regex
> This old ticket:
> http://trac.roundcube.net/ticket/1463946
> Suggests a second problem: characters in contact fields other than
> email do impact the final string used to address the message.
>
> Autocomplete concatenates contact fields when composing.
>
> First name: John, Last Name: Doe, Email: jdoe at example.com becomes
> "John Doe <jdoe at example.com>".
What you bring up is yet another thing.
Whatever you put into the name field, it should be allowed.
It should look like this:
"John ' Doe" <john at doe.com>
This is a perfectly valid email header.
And also, let's not create an issue where there is non.
And, correct - converting a string to HTML is *not* a valid fix. Never. ;-)
Till
_______________________________________________
List info: http://lists.roundcube.net/dev/
More information about the Dev
mailing list