File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ defmodule ExDoc.DocAST do
6262 end
6363
6464 defp ast_attributes_to_string ( attrs ) do
65- Enum . map ( attrs , fn { key , val } -> " #{ key } =\" #{ val } \" " end )
65+ Enum . map ( attrs , fn { key , val } -> " #{ key } =\" #{ ExDoc.Utils . h ( val ) } \" " end )
6666 end
6767
6868 ## parse markdown
Original file line number Diff line number Diff line change 2525 <%= for group <- module.docs_groups, key = text_to_id(group.title) do %>
2626 <section id="<%= key %>" class="details-list">
2727 <h1 class="section-heading"><%=h to_string(group.title) %></h1>
28- <%= if doc = group.doc do %>
28+ <%= if doc = group.doc do %>
2929 <div class="group-description" id="group-description-<%= key %>">
3030 <%= render_doc(doc) %>
3131 </div>
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ defmodule ExDoc.Formatter.HTML.Templates do
4040 def module_type ( % { type: :module } ) , do: ""
4141 def module_type ( % { type: type } ) , do: "<small>#{ type } </small>"
4242
43- defp enc ( binary ) , do: URI . encode ( binary )
43+ defp enc ( binary ) , do: ExDoc.Utils . h ( URI . encode ( binary ) )
4444
4545 @ doc """
4646 Create a JS object which holds all the items displayed in the sidebar area
Original file line number Diff line number Diff line change 11<div class="summary-<%= text_to_id(name) %> summary">
22 <h2>
3- <a href="#<%= text_to_id(name) %>"><%= name %></a>
3+ <a href="#<%=h text_to_id(name) %>"><%= name %></a>
44 </h2>
55 <%= for node <- nodes do %>
66 <div class="summary-row">
77 <div class="summary-signature">
88 <a href="#<%=enc node.id %>" data-no-tooltip="" translate="no"><%=h node.signature %></a>
99 <%= if deprecated = node.deprecated do %>
10- <span class="deprecated" title="<%= h( deprecated) %>">deprecated</span>
10+ <span class="deprecated" title="<%=h deprecated %>">deprecated</span>
1111 <% end %>
1212 </div>
1313 <%= if doc = node.doc do %>
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ defmodule ExDoc.Language.ElixirTest do
128128 ~s| <a href="https://hexdocs.pm/elixir/Kernel.html#+/2"><code class="inline">+/2</code></a>|
129129
130130 assert autolink_doc ( "`&/1`" ) ==
131- ~s| <a href="https://hexdocs.pm/elixir/Kernel.SpecialForms.html#&/1"><code class="inline">&/1</code></a>|
131+ ~s| <a href="https://hexdocs.pm/elixir/Kernel.SpecialForms.html#& /1"><code class="inline">&/1</code></a>|
132132
133133 assert autolink_doc ( "`for/1`" ) ==
134134 ~s| <a href="https://hexdocs.pm/elixir/Kernel.SpecialForms.html#for/1"><code class="inline">for/1</code></a>|
You can’t perform that action at this time.
0 commit comments