[Cpan-forum-commit] rev 64 - in trunk: lib/CPAN lib/CPAN/Forum t templates

svn at pti.co.il svn at pti.co.il
Wed Feb 2 17:41:54 IST 2005


Author: gabor
Date: 2005-02-02 17:41:53 +0200 (Wed, 02 Feb 2005)
New Revision: 64

Modified:
   trunk/lib/CPAN/Forum.pm
   trunk/lib/CPAN/Forum/Markup.pm
   trunk/t/010-markup.t
   trunk/templates/editor.tmpl
Log:
accept <br> in the html markup

Modified: trunk/lib/CPAN/Forum/Markup.pm
===================================================================
--- trunk/lib/CPAN/Forum/Markup.pm	2005-02-02 15:06:52 UTC (rev 63)
+++ trunk/lib/CPAN/Forum/Markup.pm	2005-02-02 15:41:53 UTC (rev 64)
@@ -18,6 +18,8 @@
 	           | open_b text close_b              { join "", @item[1..$#item] }
 	           | open_i text close_i              { join "", @item[1..$#item] }
 	           | open_p text close_p              { join "", @item[1..$#item] }
+			   | br                               { "<br />" }
+	br         : m{<br( /)?>}
 	open_p     : m{<p>}
 	close_p    : m{</p>}
 	open_b     : m{<b>}

Modified: trunk/lib/CPAN/Forum.pm
===================================================================
--- trunk/lib/CPAN/Forum.pm	2005-02-02 15:06:52 UTC (rev 63)
+++ trunk/lib/CPAN/Forum.pm	2005-02-02 15:41:53 UTC (rev 64)
@@ -177,8 +177,16 @@
 For some of the tests you'll have to set the CPAN_FORUM_URL environment 
 variable to the URL where you installed the forum.
 
+
+
 =head2 Changes
 
+v0.10_02
+  <p>, <br> enabled
+
+v0.10
+- markup improved, bugs fixed
+
 v0.09_05
 - POD cleanup (Shlomi Fish)
 

Modified: trunk/t/010-markup.t
===================================================================
--- trunk/t/010-markup.t	2005-02-02 15:06:52 UTC (rev 63)
+++ trunk/t/010-markup.t	2005-02-02 15:41:53 UTC (rev 64)
@@ -49,8 +49,10 @@
 	'a<b>c</b>d<i>x</i>f'      => $TEXT . 'a<b>c</b>d<i>x</i>f' . $END,
 	'&lt;'                     => $TEXT . '&lt;' . $END,
 	'<p>text</p>'              => $TEXT . '<p>text</p>' . $END,
+	'<br />'                   => $TEXT . '<br />' . $END,
+	'<br />hello'              => $TEXT . '<br />hello' . $END,
+	'<br>hello'                => $TEXT . '<br />hello' . $END,
 
-
 );
 
 my %fails = (

Modified: trunk/templates/editor.tmpl
===================================================================
--- trunk/templates/editor.tmpl	2005-02-02 15:06:52 UTC (rev 63)
+++ trunk/templates/editor.tmpl	2005-02-02 15:41:53 UTC (rev 64)
@@ -31,18 +31,11 @@
 
 <div class="posting_rules">Posting Rules:</div>
 <ul class="postrules">
-	<li> Currently no HTML markup is allowed at all. If you'd like to show &lt; 
-		you'll have to type &amp;lt;</li>
+	<li> Accepted HTML tags are: &lt;b&gt;&lt;/b&gt;, &lt;i&gt;&lt;/i&gt;, &lt;p&gt;&lt;/p&gt;, &lt;br&gt; and &lt;br /&gt;</li>
+	<li> If you'd like to show &lt; &gt; you'll have to type &amp;lt; &amp;gt; repectively</li>
 	<li> You can use a pseudo markup pair: &lt;code&gt; and &lt;/code&gt;. The idea is 
 		that you put your real code in such markup. Including plain &lt;STDIN&gt; 
 		as you like. Then when showing such parts of your posting we'll make 
 		sure it shows correctly. (If not, let us know and we'll fix it ASAP)</li>
 </ul>
-	<!--
-	<li> HTML marup is allowed but all &lt; marks will be turned into &amp;lt; so they won't have an effect other than content
-	<li> http://www.blabla.com  things will be turned into links
-	<li> a at b.c strings will be left alone as they can be valid perl code
-	<li> mailto:a at b.c  will be be turned into mailto links (I think)
-	-->
 
-



More information about the Cpan-forum-commit mailing list