I have a variable named 'reg_no' that when used as a link paramater is
getting converted into a registered trademark symbol. Here is a simple
example that illustrates it.

The controller:

    def page():
        link = A('my link', _href=URL(r=request, vars=request.vars))
        form = SQLFORM.factory(
            Field('input_one', default=request.vars.input_one),
            Field('reg_no', default=request.vars.reg_no),
            )
        return dict(form=form, link=link)

The view:

    {{=form}}
    {{=link}}


Enter values in both fields, then submit. Then click the link. The
link should refresh the page, with the form populated with the entered
values. If the second field is named 'input_two' it works. But when
it's named 'reg_no' the first input has 'aaaR_no=bbb' where 'aaa' and
'bbb' are the entered values and R is the registered trademark symbol,
and the second input is blank.

The link url is very different depending on the field name:

'input_two': http://www...com/demo/default/page?input_one=aaa&input_two=bbb
'reg_no'   : http://www...com/demo/default/page?input_one=aaa%C2%AE_no%3Dbbb

I renamed 'reg_no' to something not starting with 'reg_' and I have it
working. I'm not sure if this is a bug or not.

Any insight would be welcome.

Jim Karsten

Reply via email to