blob: 5751a87f656125b84755298e6bc86401c96d726c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Obtained-From: http://lxr.cvs.sourceforge.net/viewvc/lxr/lxr/lib/LXR/Common.pm?r1=1.62&r2=1.63&view=patch
Modified-As: two first hunks containing $Id$ changes were removed to allow clean patching
--- a/lib/LXR/Common.pm 2009/05/10 11:54:29 1.62
+++ b/lib/LXR/Common.pm 2010/01/05 17:59:38 1.63
@@ -526,9 +526,13 @@
}
sub clean_identifier {
+ # Cleans up the identifier parameter
+ # Result should be HTML-safe and a valid identifier in
+ # any supported language...
+ # Well, not Lisp symbols since they can contain anything
my $id = shift;
- $id =~ s/(^[\w`:.,]+).*/$1/ if defined $id;
+ $id =~ s/[^\w`:.,\-_ ]//g if defined $id;
return $id;
}
|