zen_id_safe fails when first character is extended latin

JohnAlbin - April 30, 2008 - 19:52
Project:Zen
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:JohnAlbin
Status:closed
Description

For example, passing zen_id_safe('Übercart') would return "-bercart" which is not a valid ID in HTML. Valid IDs must start with A-Za-z.

AttachmentSize
id-safe.patch1.52 KB

#1

JohnAlbin - April 30, 2008 - 20:07

I realized the original reason it prepended "n" to IDs was that zen_id_safe only did that when the first char was numeric.

Prepending "n" to "-bercart" doesn't make much sense. Changing it to prepend "id".

AttachmentSize
id-safe.patch1.55 KB

#2

JohnAlbin - April 30, 2008 - 20:24
Status:patch (code needs review)» fixed

Committed to HEAD and DRUPAL-5

#3

Anonymous (not verified) - May 14, 2008 - 20:34
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.