is stripslashes needed in createWidgetContent

Asked by Jakub Jankiewicz on 2011-12-01

There is this code in widgets.php

$processed_widget = stripslashes($processed_widget);

in line 534, is it needed in any way. Because wen I need to create a widget with slashes like javascript foo = 'foo\n'; and in admin panel you need to put foo = 'foo\\n'; every time you load a widget, because content of the right panel is also a widget.

Can I remove this line?

Question information

Language:
English Edit question
Status:
Solved
For:
aikiframework Edit question
Assignee:
No assignee Edit question
Solved by:
Bassel Safadi
Solved:
2011-12-01
Last query:
2011-12-01
Last reply:
2011-12-01
Best Bassel Safadi (bassel) said : #1

not sure why it was there in the first place, please try to remove it then
test it if that breaks anything
thanks

On Thu, Dec 1, 2011 at 11:20 PM, Jakub Jankiewicz <
<email address hidden>> wrote:

> New question #180651 on aikiframework:
> https://answers.launchpad.net/aikiframework/+question/180651
>
> There is this code in widgets.php
>
> $processed_widget = stripslashes($processed_widget);
>
> in line 534, is it needed in any way. Because wen I need to create a
> widget with slashes like javascript foo = 'foo\n'; and in admin panel you
> need to put foo = 'foo\\n'; every time you load a widget, because content
> of the right panel is also a widget.
>
> Can I remove this line?
>
> --
> You received this question notification because you are a member of Aiki
> Framework Developers, which is an answer contact for aikiframework.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~aikiframework-devel
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~aikiframework-devel
> More help : https://help.launchpad.net/ListHelp
>

Jakub Jankiewicz (jcubic) said : #2

Thanks Bassel Safadi, that solved my question.