Fixed that UrlHelper#link_to_unless/link_to_if used html_escape on the name if...

Fixed that UrlHelper#link_to_unless/link_to_if used html_escape on the name if no link was to be applied. This is unnecessary and breaks its use with images #1649 [joergd@pobox.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 34cbf15e
*SVN*
* Fixed that UrlHelper#link_to_unless/link_to_if used html_escape on the name if no link was to be applied. This is unnecessary and breaks its use with images #1649 [joergd@pobox.com]
* Added even more goodies to script.aculo.us #1677 [Thomas Fuchs]
* Added capability to remove draggables/droppables and redeclare sortables in dragdrop.js (this makes it possible to call sortable_element on the same element more than once, e.g. in AJAX returns that modify the sortable element. all current sortable 'stuff' on the element will be discarded and the sortable will be rebuilt)
* Always reset background color on Effect.Highlight; this make change backwards-compatibility, to be sure include style="background-color:(target-color)" on your elements or else elements will fall back to their CSS rules (which is a good thing in most circumstances)
......
......@@ -143,7 +143,7 @@ def link_to_unless(condition, name, options = {}, html_options = {}, *parameters
if block_given?
block.arity <= 1 ? yield(name) : yield(name, options, html_options, *parameters_for_method_reference)
else
html_escape(name)
name
end
else
link_to(name, options, html_options, *parameters_for_method_reference)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册