[Rt-commit] rt branch, 4.0/make-clicky-punctuation, updated. rt-4.0.12-13-g7dd73f5

Kevin Falcone falcone at bestpractical.com
Thu Aug 22 17:17:18 EDT 2013


The branch, 4.0/make-clicky-punctuation has been updated
       via  7dd73f5909dbc2b7243a404cee95d2dc97fb545c (commit)
      from  86609b80d0b3f1b2c890070e27ad880de8d0132f (commit)

Summary of changes:
 t/web/make-clicky.t | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 7dd73f5909dbc2b7243a404cee95d2dc97fb545c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Aug 22 17:09:42 2013 -0400

    make_clicky will escape content, so we have to escape before matching
    
    Also declare our testing done so tests pass.

diff --git a/t/web/make-clicky.t b/t/web/make-clicky.t
index cb56063..6b7d49b 100644
--- a/t/web/make-clicky.t
+++ b/t/web/make-clicky.t
@@ -27,9 +27,11 @@ diag "Trailing punctuation";
 diag "Punctuation as part of the url";
 {
     my $url = 'http://bestpractical.com/rt/download.html?foo=bar,baz&bat=1.2';
+    my $escaped_url = $url;
+    RT::Interface::Web::EscapeUTF8( \$escaped_url );
     is_string(
         make_clicky($m, "Refer to $url.  A following sentence."),
-        qq[Refer to <span class="clickylink"><a target="new" href="$url">$url</a></span>.  A following sentence.],
+        qq[Refer to <span class="clickylink"><a target="new" href="$escaped_url">$escaped_url</a></span>.  A following sentence.],
         "Punctuation in middle of URL",
     );
 }
@@ -43,4 +45,5 @@ sub make_clicky {
     return $m->success ? $m->content : "";
 }
 
-1;
+undef $m;
+done_testing();

-----------------------------------------------------------------------


More information about the Rt-commit mailing list