Add JavaScript at Album Summary

martinnitram

Joined: 2006-07-21
Posts: 10
Posted: Sat, 2007-05-26 07:01

The following information is required to get an answer:
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version: 1.5.6
Apache version: 2.0.x
PHP version (don't just say PHP 4, please): 4.2.x
Graphics Toolkit:
Operating system: FreeBSD
Web browser/version (if applicable):

Dear all,

I tried to add some javascript at "Album Summary" (after admin login-> select 'properties' at 'Album Action' -> 'Texts'). After edited the text, it seem Gallery will delete all javascript code and also change '"' to '"', which will cause the '&quot' appear repeatedly after next edit .

I would like to ask that can i add javascript at "Album Summary"? Also how to solve the '"' problem?

Thx for helping

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sat, 2007-05-26 07:35

Hi,

Since Gallery 1.5.3 we forbid Javascript in any inputfield as its a potentiell security risc.
You need to edit classes/HTML_Safe/Safe.php to allow it again.

About the @quot thing: Can you give me the URL to a phpinfo of your server?

Jens
--
Last Gallery v1 Developer and v1 translation manager.

 
martinnitram

Joined: 2006-07-21
Posts: 10
Posted: Sat, 2007-05-26 08:23

thx for fast reply
I treid to edit classes/HTML_Safe/Safe.php, and just found 'javascript' at $blackProtocols and at no javascript at $deleteTags. So should i delete 'javascript' at $blackProtocols?

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Sat, 2007-05-26 08:37

Hello,

just delete 'scripts' from $deleteTags and $deleteTagsContent.

Jens
--
Last Gallery v1 Developer and v1 translation manager.

 
martinnitram

Joined: 2006-07-21
Posts: 10
Posted: Sat, 2007-05-26 13:32

Thx, it work.

 
martinnitram

Joined: 2006-07-21
Posts: 10
Posted: Wed, 2007-05-30 14:41

And here is the phpinfo.
sorry that it is using Apache 2.x and PHP 4.3.x

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Wed, 2007-05-30 14:39

Thats not really the phpinfo i mean ;-)

Jens
--
Last Gallery v1 Developer and v1 translation manager.