mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 11:10:12 +01:00
Merge pull request #21 from afirel/master
Decode HTML entities when displaying todos formatted as TXT.
This commit is contained in:
commit
5d2fec325c
3 changed files with 8 additions and 2 deletions
1
Gemfile
1
Gemfile
|
|
@ -17,6 +17,7 @@ gem "rubycas-client", "~>2.2.1"
|
|||
gem "ruby-openid", :require => "openid"
|
||||
gem "sqlite3"
|
||||
gem 'bcrypt-ruby', '~> 2.1.4'
|
||||
gem 'htmlentities', '~> 4.3.0'
|
||||
|
||||
gem "webrat", ">=0.7.0", :groups => [:cucumber, :test]
|
||||
gem "database_cleaner", ">=0.5.0", :groups => [:cucumber, :selenium]
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ GEM
|
|||
hoe (2.12.0)
|
||||
rake (~> 0.8)
|
||||
hpricot (0.8.4)
|
||||
htmlentities (4.3.0)
|
||||
httpclient (2.2.1)
|
||||
json (1.5.3)
|
||||
memory_test_fix (0.1.3)
|
||||
|
|
@ -107,6 +108,7 @@ DEPENDENCIES
|
|||
highline (~> 1.5.0)
|
||||
hoe
|
||||
hpricot
|
||||
htmlentities (~> 4.3.0)
|
||||
memory_test_fix (~> 0.1.3)
|
||||
mongrel
|
||||
rack (= 1.1.0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<%
|
||||
require 'htmlentities'
|
||||
htmlentities = HTMLEntities.new
|
||||
|
||||
todo = text_todo
|
||||
|
||||
if (todo.starred?)
|
||||
|
|
@ -8,11 +11,11 @@ else
|
|||
end
|
||||
|
||||
if (todo.completed?) && todo.completed_at
|
||||
result_string << "["+ t('todos.completed') +": " + format_date(todo.completed_at) + "] "
|
||||
result_string << "["+ htmlentities.decode(t('todos.completed')) +": " + format_date(todo.completed_at) + "] "
|
||||
end
|
||||
|
||||
if todo.due
|
||||
result_string << "[" + t('todos.due') + ": " + format_date(todo.due) + "] "
|
||||
result_string << "[" + htmlentities.decode(t('todos.due')) + ": " + format_date(todo.due) + "] "
|
||||
result_string << todo.description + " "
|
||||
else
|
||||
result_string << todo.description + " "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue