--- /usr/share/bamboo/filters/text2html.php	2005-03-31 00:59:58.000000000 +0200
+++ bamboo/filters/text2html.php	2006-02-16 17:18:31.000000000 +0100
@@ -328,6 +328,10 @@
 }
 
 function setupTransforms() {
+
+# 2006-01-31 tino: hack for "nolink"
+global $page;
+
 	$transform = array (
 		'/([^\w])_(.*)_([^\w])/' => '$1<i>$2</i>$3',
 		'/\*([^\s\*]+[^\*]*[^\s])\*/' => '<b>$1</b>',
@@ -338,9 +342,15 @@
 		'/(^|\s)(.*?)@(.*?)/' => '$1$2<!-- -->@<!-- -->$3',
 #		'/^\s*-{3,}/' => '<table border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor=black><tr><td><img height=1 width=2></td></tr></table>                                                                  ',
 		'/^\s*-{3,}\s*$/' => '<table border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor=black><tr><td><img height=1 width=2></td></tr></table>                                                                  ',
-		"!(^|[^/]|\s)((www\.)([-a-z0-9.]{2,}\.[a-z]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i" => '$1<a href="http://$2">$2</a>',
-		"!(^|[^\"]|\s)(((http(s?)|ftp)://)([-a-z0-9.]{2,}\.[a-z]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i" => '$1<a href="$2">$6$8</a>',
+#		"!(^|[^/]|\s)((www\.)([-a-z0-9.]{2,}\.[a-z]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i" => '$1<a href="http://$2">$2</a>',
+#		"!(^|[^\"]|\s)(((http(s?)|ftp)://)([-a-z0-9.]{2,}\.[a-z0-9]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i" => '$1<a href="$2">$6$8</a>',
 	);
+# If the page has a "nolink" description,
+# disable automatic linking to protect against threats to free speech rights.
+	if (strpos($page->get('description'), '-nolink-')===false)
+		$transform["!(^|[^/]|\s)((www\.)([-a-z0-9.]{2,}\.[a-z0-9]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i"]='$1<a href="http://$2">$2</a>';
+	$transform["!(^|[^\"]|\s)(((http(s?)|ftp)://)([-a-z0-9.]{2,}\.[a-z0-9]{2,4}(:[0-9]+)?)((/([^\s]*[^\(\)\s.,\"'])?)?)((\?([^\s]*[^\s.,\"'])?)?))!i"] = '$1<a href="$2">$6$8</a>';
+
 	$this->search = array_keys($transform);
 	$this->replace = array_values($transform);
 }
