Skip to content

Commit 57c92d8

Browse files
committed
security: HTML sanitize for source_code
1 parent 07b3e58 commit 57c92d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sdoc/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def method_source_code_and_url(rdoc_method)
3131
source_url = github_url(Regexp.last_match(1), line: Regexp.last_match(2))
3232
end
3333

34-
[rdoc_method.instance_of?(RDoc::GhostMethod) ? nil : source_code, source_url]
34+
[rdoc_method.instance_of?(RDoc::GhostMethod) ? nil : h(source_code), source_url]
3535
end
3636
end

0 commit comments

Comments
 (0)