Commits

Anonymous committed 07a68b8

Made _escape a "private" subroutine.

This is to avoid people depending on it.

Comments (0)

Files changed (1)

lib/SVN/RaWeb/Light.pm

 
 # Preloaded methods go here.
 
-# We alias escape() to CGI::escapeHTML().
-*escape = \&CGI::escapeHTML;
+# We alias _escape() to CGI::escapeHTML().
+*_escape = \&CGI::escapeHTML;
 
 sub new
 {
     
     $self->rev_num($rev_num);
     $self->url_suffix($self->_get_url_suffix_with_extras());
-    $self->esc_url_suffix(escape($self->url_suffix()));
+    $self->esc_url_suffix(_escape($self->url_suffix()));
 }
 
 # Gets the URL suffix calculated with optional extra components.
 sub _get_escaped_path
 {
     my $self = shift;
-    return escape($self->path());
+    return _escape($self->path());
 }
 
 sub _check_node_kind
         (
             map { 
             +{ 
-                'url' => escape($_->{'url'}), 
-                'label' => escape($_->{'label'}),
+                'url' => _escape($_->{'url'}), 
+                'label' => _escape($_->{'label'}),
             }
             }
             @{$self->_get_url_translations('is_list_item' => 1)}
 
     $self->path() =~ /^(.*?)[^\/]+$/;
 
-    return escape($1);    
+    return _escape($1);    
 }
 
 sub _real_render_up_list_item
 {
     my ($self, $entry) = @_;
 
-    my $escaped_name = escape($entry); 
+    my $escaped_name = _escape($entry); 
     if ($self->dir_contents->{$entry}->kind() eq $SVN::Node::dir)
     {
         $escaped_name .= "/";
         {
             (map { $_ => $escaped_name } qw(link label)),
             'path_in_repos' => 
-                (escape($self->_get_normalized_path()).$escaped_name),
+                (_escape($self->_get_normalized_path()).$escaped_name),
         }
     );
 }
         foreach my $trans (@$top_url_translations)
         {
             my $url = $self->_get_normalized_path();
-            my $escaped_url = escape($trans->{'url'} . $url);
-            my $escaped_label = escape($trans->{'label'});
+            my $escaped_url = _escape($trans->{'url'} . $url);
+            my $escaped_label = _escape($trans->{'label'});
             $ret .= "<tr><td><a href=\"$escaped_url\">$escaped_label</a></td></tr>\n";
         }
         $ret .= "</table>\n";
     my $self = shift;
     print "<ul>\n" .
         "<li><a href=\"./?mode=help\">Show Help Screen</a></li>\n" .
-        "<li><a href=\"./" . escape($self->_get_url_suffix_with_extras("panel=1")) . "\">Show Control Panel</a></li>\n" .
+        "<li><a href=\"./" . _escape($self->_get_url_suffix_with_extras("panel=1")) . "\">Show Control Panel</a></li>\n" .
         "</ul>\n";
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.