Skip to content

Commit

Permalink
added multibyte support for the subject of a issue by removing invali…
Browse files Browse the repository at this point in the history
…d UTF-8 characters.
  • Loading branch information
iteman committed Sep 1, 2009
1 parent 2798415 commit 85e050f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/todos/_new_todo.html.erb
Expand Up @@ -39,7 +39,8 @@
<%= f.select :issue_id,
todo.possible_issues.collect{ |i|
["##{i.id} #{i.subject[0..40]}... #{i.tracker.name}" , i.id]
subject = i.subject[0..40].scan(/([\x00-\x7f]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3})/).join
["##{i.id} #{subject}... #{i.tracker.name}" , i.id]
},
:prompt=> l(:todo_new_issue_tooltip)
%>
Expand Down

0 comments on commit 85e050f

Please sign in to comment.