On Mar 3, 2011, at 4:13 PM, pbreit wrote:
> I have a strange problem where a URL() tag is switching an underscore in the 
> function name to a dash.

This is the default behavior for the new router: hyphens in the URL for a/c/f 
become underscores internally. You can turn it off if you want. BTW, you don't 
need the admin router; it was an artifact of doctesting, and is gone in the 
trunk. Try this (everything else you had set is the default):

routers = dict(
    BASE = dict(
        map_hyphen = False, # don't map hyphens to underscores
    ),
)


> 
> Code:
> {{=A('contact %s' % (item.seller.name), _href=URL(c='default', 
> f='contact_seller', args=item.id))}}
> sam with {{=A('contact %s' % (item.seller.name), _href=URL('default', 
> 'contact_seller', args=item.id))}}
> 
> HTML:
> <a href="/contact-seller/1">contact cheekob</a>
> 
> I have not done anything to my routes or anything else to swap 
> underscores/dashes as far as I know.
> 
> Mac Version 1.92.1 (2011-02-16 15:04:40)


Reply via email to