make_name produces a blank name if the title is all special characters

Bug #371723 reported by Jason Lantz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Shane Hathaway

Bug Description

Since make_name strips all special characters out of the input string before building a name, entering a title for content that uses make_name (tested with an Event in a community calendar, but should be reproducible elsewhere too) causes the following exception:

TypeError: Name must not be empty

The string I used to create the problem is:
ΆЂⁿ₤№⅞↓∆⌂█

Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 371723] [NEW] make_name produces a blank name if the title is all special characters

What should it do?

I guess the best thing is to generate a form validation error so we
don't provide the General KARL Error message?

--Paul

On May 4, 2009, at 11:42 AM, Jason Lantz wrote:

> Public bug reported:
>
> Since make_name strips all special characters out of the input string
> before building a name, entering a title for content that uses
> make_name
> (tested with an Event in a community calendar, but should be
> reproducible elsewhere too) causes the following exception:
>
> TypeError: Name must not be empty
>
> The string I used to create the problem is:
> ΆЂⁿ₤№⅞↓∆⌂█
>
> ** Affects: karl3
> Importance: Undecided
> Status: New
>
> --
> make_name produces a blank name if the title is all special characters
> https://bugs.launchpad.net/bugs/371723
> You received this bug notification because you are subscribed to
> KARL3.
>
> Status in Porting KARL to a new architecture: New
>
> Bug description:
> Since make_name strips all special characters out of the input
> string before building a name, entering a title for content that
> uses make_name (tested with an Event in a community calendar, but
> should be reproducible elsewhere too) causes the following exception:
>
> TypeError: Name must not be empty
>
> The string I used to create the problem is:
> ΆЂⁿ₤№⅞↓∆⌂█

Changed in karl3:
assignee: nobody → Chris Rossi (chris-archimedeanco)
importance: Undecided → Medium
milestone: none → m14
Revision history for this message
Chris Rossi (chris-archimedeanco) wrote : Re: [Bug 371723] Re: make_name produces a blank name if the title is all special characters

Sounds reasonable to me.

Chris

On Mon, May 4, 2009 at 12:01 PM, Paul Everitt <email address hidden> wrote:

>
> What should it do?
>
> I guess the best thing is to generate a form validation error so we
> don't provide the General KARL Error message?
>
> --Paul
>
> On May 4, 2009, at 11:42 AM, Jason Lantz wrote:
>
> > Public bug reported:
> >
> > Since make_name strips all special characters out of the input string
> > before building a name, entering a title for content that uses
> > make_name
> > (tested with an Event in a community calendar, but should be
> > reproducible elsewhere too) causes the following exception:
> >
> > TypeError: Name must not be empty
> >
> > The string I used to create the problem is:
> > ΆЂⁿ₤№⅞↓∆⌂█
> >
> > ** Affects: karl3
> > Importance: Undecided
> > Status: New
> >
> > --
> > make_name produces a blank name if the title is all special characters
> > https://bugs.launchpad.net/bugs/371723
> > You received this bug notification because you are subscribed to
> > KARL3.
> >
> > Status in Porting KARL to a new architecture: New
> >
> > Bug description:
> > Since make_name strips all special characters out of the input
> > string before building a name, entering a title for content that
> > uses make_name (tested with an Event in a community calendar, but
> > should be reproducible elsewhere too) causes the following exception:
> >
> > TypeError: Name must not be empty
> >
> > The string I used to create the problem is:
> > ΆЂⁿ₤№⅞↓∆⌂█
>
>
> ** Changed in: karl3
> Importance: Undecided => Medium
>
> ** Changed in: karl3
> Milestone: None => m14
>
> ** Changed in: karl3
> Assignee: (unassigned) => Chris Rossi (chris-archimedeanco)
>
> --
> make_name produces a blank name if the title is all special characters
> https://bugs.launchpad.net/bugs/371723
> You received this bug notification because you are a bug assignee.
>
> Status in Porting KARL to a new architecture: New
>
> Bug description:
> Since make_name strips all special characters out of the input string
> before building a name, entering a title for content that uses make_name
> (tested with an Event in a community calendar, but should be reproducible
> elsewhere too) causes the following exception:
>
> TypeError: Name must not be empty
>
> The string I used to create the problem is:
> ΆЂⁿ₤№⅞↓∆⌂█
>

Revision history for this message
Jason Lantz (jasontlantz) wrote :

In KARL2, the Plone equivalent of make_name produces an id of "a452n20a4No78219322062302" for the blog entry. I think it is converting the special characters to their hex values.

As it is possible, especially in certain languages, to have a title without any normal ASCII characters in the name, I think we should support such a title as we did in KARL2. I am indifferent to how make_name actually works in KARL3, just so long as the same user facing functionality exists between the two systems.

Revision history for this message
Chris Rossi (chris-archimedeanco) wrote :

make_name is using a regular expression to match against non-letter
characters. I believe that regular expression library, being unicode aware,
is respecting the unicode definition of letter characters--Ie not just US
Ascii. This is worth testing, though.

We really are only trying to strip so called non-letter, ie symbol and
whitespace characters in make_name, while leaving letters, in whichever
alphabet they are defined.

Since these names are used to construct urls, though, it's probably worth
double checking that browsers actually do the right thing with unicode in
urls. I'm not entirely sure where this issue stands.

I would propose that *if* make_name really is only stripping non-letter
characters as defined above and *if* browsers can support unicode urls, that
we continue stripping those characters and show the user an error if that
creates a blank name. If one of these turns out not to be true, though,
then we should use the ascii encoding mentioned above.

Is that reasonable?

Chris

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Forgot to mention: trying to do a little triage (ChrisR has a lot on his plate, probably going to get more as we get migration things reported.)

Changed in karl3:
assignee: Chris Rossi (chris-archimedeanco) → Shane Hathaway (shane-hathawaymix)
Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

Fixed in revision 2724.

Changed in karl3:
status: New → Fix Committed
Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.