]How To Place an Anchor Tag In a Gallery Edit>Title or Eit>Description: This Was Successful, But NOW Gets Immediately Nullified

HenryG

Joined: 2002-09-05
Posts: 4
Posted: Thu, 2007-10-11 20:53

Help Please with how to do Anchor Tag scroll down in Gallery Discriptions:

How To Place an Anchor Tag In a Gallery Edit>Title or Eit>Description: This Was Successful, But NOW Gets Immediately Nullified When I Click "Save"?

I want to use link = http://ww2.usca.edu/ResearchProjects/ProfessorGurr/gallery/albums.php?set_albumListPage=2#rwbb
to scroll the above gallery album page down to my "Anchor Tag" = <a name="rwbb"></a> which was in previous album description (just above Album = "Enjoy Redwing Blackbirds & Flowers")

About two years a go and with an earlier version of Gallery I, this was successfully done for a very long time. But now, when I try to save this = <a name="rwbb"></a>, it immediately gets changed to = <a ></a>, which of course prevents the Ancor Tag from working.

I have checked with several HTML editiors and Help pages, and this seems to be valid HTML code. I have searched Gallery Forums, for Clues, but none found. PLEASE HELP.

Henry S Gurr
http://ww2.usca.edu/ResearchProjects/ProfessorGurr/
************************************

See end for my PHP diagnostic.
Gallery URL= http://ww2.usca.edu/ResearchProjects/ProfessorGurr/gallery/
Gallery version = Powered by Gallery v1.5.3
Apache version = Apache 2.0
PHP version =PHP v5.1.2 is OK.
Graphics Toolkit = Not sure.
Operating system = Not sure.
Web browser/version = Firefox/2.0.0.7

The following information is from my Gallery Diagnostic,(in the configuration wizard)
System Linux ubuntu 2.6.15-26-server #1 SMP Thu Aug 3 04:09:15 UTC 2006 i686
Build Date Jul 17 2007 17:20:50
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, convert.iconv.*, bzip2.*, zlib.*
********** END Thanks for your help. ***********

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Thu, 2007-10-11 21:44

Hello,

Gallery 1.5.x+ uses a Library called 'HTML_Safe' to sanitize input.
The "name" attribut is considered as dangerous and thus deleted.

If you want to allow it, open classes/HTML_Safe/Safe.php
find

/**
     * List of dangerous attributes
     *
     * @var array
     * @access public
     */
    var $attributes = array('dynsrc', 'id', 'name', );

And remove 'name' from the array.

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6