In machines.cgi: do not skip [[- purposes. "[[-<hostname>]]" gets stuff added to...
authorPeter Palfrader <peter@palfrader.org>
Fri, 8 May 2009 23:30:55 +0000 (01:30 +0200)
committerPeter Palfrader <peter@palfrader.org>
Fri, 8 May 2009 23:30:55 +0000 (01:30 +0200)
debian/changelog
machines.cgi

index 80182f4..fd2c95c 100644 (file)
@@ -1,3 +1,10 @@
+userdir-ldap-cgi (0.3.25) unstable; urgency=low
+
+  * In machines.cgi: do not skip [[- purposes. "[[-<hostname>]]" gets
+    stuff added to ssh_known_hosts but not http linked.
+
+ -- Peter Palfrader <weasel@debian.org>  Sat, 09 May 2009 01:29:52 +0200
+
 userdir-ldap-cgi (0.3.24) unstable; urgency=low
 
   * Ignore the * in [[*host]] links, and ignore [[- ]] in [[-hostname]]
index d67aa3f..4108fff 100755 (executable)
@@ -90,9 +90,9 @@ sub wiki_link($) {
        # [[hostname]] makes a link too
        # if you add a * after [[ it's still the same, only not used for ssh_known_hosts in ud-generate
        # [[-hostname]] are not links, but get added to known_hosts.  we should drop the [[- ]] tho
+       $in =~ s#\[\[-(.*?)\]\]#$1#g;
        $in =~ s#\[\[\*?(.*?)\|(.*?)\]\]#<a href="http://$1">$2</a>#g;
        $in =~ s#\[\[\*?(.*?)\]\]#<a href="http://$1">$1</a>#g;
-       $in =~ s#\[\[-(.*?)\]\]#$1#g;
        return $in;
 }
 
@@ -106,7 +106,7 @@ sub wiki_link($) {
 sub item_uplist($) {
        my ($items) = @_;
        my $out = undef;
-       my(@tmp) = grep(!/\[\[-/, @$items);
+       my(@tmp) = @$items;
 
        if (scalar @tmp>= 1) {
                $out = "<ul>".