Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
324de199
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
324de199
编写于
6月 16, 2010
作者:
R
Rizwan Reza
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added titles and description.
上级
687282dd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
37 addition
and
17 deletion
+37
-17
actionpack/lib/action_view/helpers/record_tag_helper.rb
actionpack/lib/action_view/helpers/record_tag_helper.rb
+1
-0
actionpack/lib/action_view/helpers/sanitize_helper.rb
actionpack/lib/action_view/helpers/sanitize_helper.rb
+11
-5
actionpack/lib/action_view/helpers/scriptaculous_helper.rb
actionpack/lib/action_view/helpers/scriptaculous_helper.rb
+5
-2
actionpack/lib/action_view/helpers/tag_helper.rb
actionpack/lib/action_view/helpers/tag_helper.rb
+1
-0
actionpack/lib/action_view/helpers/text_helper.rb
actionpack/lib/action_view/helpers/text_helper.rb
+1
-0
actionpack/lib/action_view/helpers/translation_helper.rb
actionpack/lib/action_view/helpers/translation_helper.rb
+17
-10
actionpack/lib/action_view/helpers/url_helper.rb
actionpack/lib/action_view/helpers/url_helper.rb
+1
-0
未找到文件。
actionpack/lib/action_view/helpers/record_tag_helper.rb
浏览文件 @
324de199
module
ActionView
# = Action View Record Tag Helpers
module
Helpers
module
RecordTagHelper
# Produces a wrapper DIV element with id and class parameters that
...
...
actionpack/lib/action_view/helpers/sanitize_helper.rb
浏览文件 @
324de199
...
...
@@ -2,19 +2,25 @@
require
'action_view/helpers/tag_helper'
module
ActionView
# = Action View Sanitize Helpers
module
Helpers
#:nodoc:
# The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements.
# These helper methods extend Action View making them callable within your template files.
module
SanitizeHelper
# This +sanitize+ helper will html encode all tags and strip all attributes that aren't specifically allowed.
# It also strips href/src tags with invalid protocols, like javascript: especially. It does its best to counter any
# tricks that hackers may use, like throwing in unicode/ascii/hex values to get past the javascript: filters. Check out
# This +sanitize+ helper will html encode all tags and strip all attributes that
# aren't specifically allowed.
#
# It also strips href/src tags with invalid protocols, like javascript: especially.
# It does its best to counter any tricks that hackers may use, like throwing in
# unicode/ascii/hex values to get past the javascript: filters. Check out
# the extensive test suite.
#
# <%= sanitize @article.body %>
#
# You can add or remove tags/attributes if you want to customize it a bit. See ActionView::Base for full docs on the
# available options. You can add tags/attributes for single uses of +sanitize+ by passing either the <tt>:attributes</tt> or <tt>:tags</tt> options:
# You can add or remove tags/attributes if you want to customize it a bit.
# See ActionView::Base for full docs on the available options. You can add
# tags/attributes for single uses of +sanitize+ by passing either the
# <tt>:attributes</tt> or <tt>:tags</tt> options:
#
# Normal Use
#
...
...
actionpack/lib/action_view/helpers/scriptaculous_helper.rb
浏览文件 @
324de199
...
...
@@ -2,9 +2,11 @@
require
'active_support/json'
module
ActionView
# = Action View Scriptaculous Helpers
module
Helpers
# Provides a set of helpers for calling Scriptaculous JavaScript
# functions, including those which create Ajax controls and visual effects.
# Provides a set of helpers for calling Scriptaculous[http://script.aculo.us/]
# JavaScript functions, including those which create Ajax controls and visual
# effects.
#
# To be able to use these helpers, you must include the Prototype
# JavaScript framework and the Scriptaculous JavaScript library in your
...
...
@@ -12,6 +14,7 @@ module Helpers
# for more information on including the necessary JavaScript.
#
# The Scriptaculous helpers' behavior can be tweaked with various options.
#
# See the documentation at http://script.aculo.us for more information on
# using these helpers in your application.
module
ScriptaculousHelper
...
...
actionpack/lib/action_view/helpers/tag_helper.rb
浏览文件 @
324de199
...
...
@@ -2,6 +2,7 @@
require
'set'
module
ActionView
# = Action View Tag Helpers
module
Helpers
#:nodoc:
# Provides methods to generate HTML tags programmatically when you can't use
# a Builder. By default, they output XHTML compliant tags.
...
...
actionpack/lib/action_view/helpers/text_helper.rb
浏览文件 @
324de199
...
...
@@ -3,6 +3,7 @@
require
'action_view/helpers/tag_helper'
module
ActionView
# = Action View Text Helpers
module
Helpers
#:nodoc:
# The TextHelper module provides a set of methods for filtering, formatting
# and transforming strings, which can reduce the amount of inline Ruby code in
...
...
actionpack/lib/action_view/helpers/translation_helper.rb
浏览文件 @
324de199
require
'action_view/helpers/tag_helper'
module
ActionView
# = Action View Translation Helpers
module
Helpers
module
TranslationHelper
# Delegates to I18n#translate but also performs three additional functions. First, it'll catch MissingTranslationData exceptions
# and turn them into inline spans that contains the missing key, such that you can see in a view what is missing where.
# Delegates to I18n#translate but also performs three additional functions.
# First, it'll catch MissingTranslationData exceptions and turn them into
# inline spans that contains the missing key, such that you can see in a
# view what is missing where.
#
# Second, it'll scope the key by the current partial if the key starts with a period. So if you call translate(".foo") from the
# people/index.html.erb template, you'll actually be calling I18n.translate("people.index.foo"). This makes it less repetitive
# to translate many keys within the same partials and gives you a simple framework for scoping them consistently. If you don't
# prepend the key with a period, nothing is converted.
# Second, it'll scope the key by the current partial if the key starts
# with a period. So if you call <tt>translate(".foo")</tt> from the
# <tt>people/index.html.erb</tt> template, you'll actually be calling
# <tt>I18n.translate("people.index.foo")</tt>. This makes it less repetitive
# to translate many keys within the same partials and gives you a simple framework
# for scoping them consistently. If you don't prepend the key with a period,
# nothing is converted.
#
# Third, it'll mark the translation as safe HTML if the key has the suffix "_html" or the last element of the key is the word
# "html". For example, calling translate("footer_html") or translate("footer.html") will return a safe HTML string that won't
# be escaped by other HTML helper methods. This naming convention helps to identify translations that include HTML tags so that
# Third, it'll mark the translation as safe HTML if the key has the suffix
# "_html" or the last element of the key is the word "html". For example,
# calling translate("footer_html") or translate("footer.html") will return
# a safe HTML string that won't be escaped by other HTML helper methods. This
# naming convention helps to identify translations that include HTML tags so that
# you know what kind of output to expect when you call translate in a template.
def
translate
(
key
,
options
=
{})
translation
=
I18n
.
translate
(
scope_key_by_partial
(
key
),
options
.
merge!
(
:raise
=>
true
))
if
html_safe_translation_key?
(
key
)
&&
translation
.
respond_to?
(
:html_safe
)
...
...
actionpack/lib/action_view/helpers/url_helper.rb
浏览文件 @
324de199
...
...
@@ -4,6 +4,7 @@
require
'action_dispatch'
module
ActionView
# = Action View URL Helpers
module
Helpers
#:nodoc:
# Provides a set of methods for making links and getting URLs that
# depend on the routing subsystem (see ActionDispatch::Routing).
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录