:)
Hi,
Thanks all for the replies.
I finally got it working. The problem was that the user_name variable
itself was 'something'.
Really sorry for this silly mistake.
Special thanks to Massimo !! Regarding XSS concern, thanks but this is
not the user name of the database table. It is just a common
On Thursday, December 8, 2011 7:34:52 AM UTC-5, Saurabh Kumar wrote:
>
> Hi,
>
> I am returning a dict (user_name="something") from my controller.
>
> In my view, I am displaying it using {{=user_name}}
>
> It generates an html code like...
>
> something
>
If user_name truly has the value "somethi
That's weird. I tried your code but I am unable to reproduce the html
you got .
If "user_name" is what you need:
#view
{{if auth.is_logged_in:}}
{{=session.auth.user.name}}
{{pass}}
On Dec 8, 9:28 pm, Saurabh Kumar wrote:
> My view file looks like :
>
> {{extend 'layout.html'}}
> {{=user_name
I do not understand you question.
if
{{=user_name}}
outputs
something
It is because user_name == 'something'
Is that the case? Do you want to parse the data, remove the tag and
then print it?
It seems wrong to me to store HTML into user name. It could cause XSS.
On Dec 8, 6:34 am, S
Hi,
If you could give some idea about the definition of response.write
function (where it is defined), it will help.
On Dec 8, 6:28 pm, Saurabh Kumar wrote:
> My view file looks like :
>
> {{extend 'layout.html'}}
> {{=user_name}}
>
>
> {{for line in lines:}}
>
My view file looks like :
{{extend 'layout.html'}}
{{=user_name}}
{{for line in lines:}}
{{=line}}
{{pass}}
Saurabh,
>> {{=user_name}}
will only give:
>> something
in view, without the additional code (span, style etc that you
mentioned).
If it doesn't work for you, please show us the actual code that is not
performing as expected.
On Dec 8, 9:08 pm, Saurabh Kumar wrote:
> Thanks for you reply.
>
Thanks for you reply.
But my controller is not that simple,
The return statement actually looks like
return
dict(lines=lines,channels=channels,staff=staff,current=int(request.args[0]),user_name=s.name)
On Dec 8, 5:49 pm, Vinicius Assef wrote:
> In your controller, just return "somethin
9 matches
Mail list logo