From 05f21ebba25cc3232876add7dc4be33c62ce93f0 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Fri, 3 Oct 2008 10:19:41 -0400 Subject: [PATCH] Spec and fix bug #776 by using auto_link instead of my dumb regex --- app/views/notes/_notes.rhtml | 2 +- app/views/todos/_toggle_notes.rhtml | 2 +- spec/views/notes/_notes.rhtml_spec.rb | 36 ++++++++++++++++++++ spec/views/todos/_toggle_notes.rhtml_spec.rb | 33 ++++++++++++++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 spec/views/notes/_notes.rhtml_spec.rb create mode 100644 spec/views/todos/_toggle_notes.rhtml_spec.rb diff --git a/app/views/notes/_notes.rhtml b/app/views/notes/_notes.rhtml index 9391d108..de9068b8 100644 --- a/app/views/notes/_notes.rhtml +++ b/app/views/notes/_notes.rhtml @@ -2,7 +2,7 @@

<%= link_to("Note #{note.id}", note_path(note), :title => "Show note #{note.id}" ) %>

- <%= sanitize(textilize(note.body.gsub(/((https?:\/\/[^ \n\t]*))/, '"\1":\2'))) %> + <%= sanitize(markdown(auto_link(note.body))) %>