Forums | Mahara Community

Developers /
script tag in admin pages


anonymous profile picture
Account deleted
Posts: 2

11 January 2012, 13:59

Hello community,

I'm currently looking for a way to allow HTML script tag in admin web page in order to allow jquery content for not connected users page (homepage). I've checked in tinymce configuration and script tag is allowed in extended_valid_elements list.

Is there a simple way to define wanted tags for admins users?

Thanks

Serge

anonymous profile picture
Account deleted
Posts: 808

11 January 2012, 15:16

Hi Serge,

The script tags (and other unsafe elements/attributes) are removed from user content by htmlpurifier when the page is generated.  I guess that policy could be relaxed for content that's only editable by site admins, who should know what they're doing.  I'd be interested to hear others opinions on this, so file a bug report if you like.

In the meantime, you could edit the file htdocs/theme/raw/templates/index.tpl (or override it in your own custom theme) to let the raw HTML through, you just need to change the line

{$page_content|clean_html|safe}

to

{$page_content|safe}
anonymous profile picture
Account deleted
Posts: 2

11 January 2012, 17:12

Thanks a lot Richard for that quick answer. I'll open a bug report on that point, i'm interrested too about comments on that.

Cheers

Serge

3 results