Changeset 40385


Ignore:
Timestamp:
Sep 30, 2008, 7:14:32 AM (12 years ago)
Author:
jmpp@…
Message:
  • Don't urlencode() the path to the Portfile in the trac browser as that, somehow, breaks the url; fixes #16672;
  • Don't htmlspecialchars the return of our obfuscate_email() function, as that turns valid html syntax into renderable text, thus breaking the html;

I noticed these problems a while back on my local server when I upgraded PHP to its latest 5.2.6 release, so I guess Mac OS Forge is now going through the
same process. But frankly I don't really understand how these problems hadn't surfaced before.

PS: A bit of further investigation releaved to me both Safari 3.1.2 and Firefox 3.0.3 rendered the ports.php page without any hiccups, and the problem
only surfaced when using the latest WebKit nightly builds (which I've been using for a while now). Nevertheless, the two fixes still stand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/ports.php

    r37825 r40385  
    165165
    166166                /* Port name and Portfile URL */
    167                 print "<dt><b><a href=\"${trac_url}browser/trunk/dports/" . urlencode($row['path']) . "/Portfile\">" . htmlspecialchars($row['name'])
     167                print "<dt><b><a href=\"${trac_url}browser/trunk/dports/" . $row['path'] . "/Portfile\">" . htmlspecialchars($row['name'])
    168168                . '</a></b> ' . htmlspecialchars($row['version']) . '</dt>';
    169169               
     
    182182                        if ($primary) { print ' <b>'; }
    183183                        else { print ' '; }
    184                         print htmlspecialchars(obfuscate_email($nrow[0]));
     184                        print obfuscate_email($nrow[0]);
    185185                        if ($primary) { print '</b>'; }
    186186                        $primary = 0;
Note: See TracChangeset for help on using the changeset viewer.