Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure urls are uri_escape'd
Fixes problems with links to operators like % and / being unescaped.
  • Loading branch information
Mouq committed Aug 8, 2014
1 parent 8093e18 commit aa56705
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions htmlify.p6
Expand Up @@ -221,7 +221,7 @@ multi write-type-source($doc) {
);
$pod.content.push: pod-link(
'Full-size type graph image as SVG',
"/images/type-graph-$podname.svg",
"/images/type-graph-{uri_escape $podname}.svg",
);

my @mro = $type.mro;
Expand All @@ -233,7 +233,7 @@ multi write-type-source($doc) {
pod-heading("Methods supplied by role $r"),
pod-block(
"$podname does role ",
pod-link($r.name, "/type/$r"),
pod-link($r.name, "/type/{uri_escape ~$r}"),
", which provides the following methods:",
),
%methods-by-type{$r}.list,
Expand All @@ -245,7 +245,7 @@ multi write-type-source($doc) {
pod-heading("Methods supplied by class $c"),
pod-block(
"$podname inherits from class ",
pod-link($c.name, "/type/$c"),
pod-link($c.name, "/type/{uri_escape ~$c}"),
", which provides the following methods:",
),
%methods-by-type{$c}.list,
Expand All @@ -256,9 +256,9 @@ multi write-type-source($doc) {
pod-heading("Methods supplied by role $r"),
pod-block(
"$podname inherits from class ",
pod-link($c.name, "/type/$c"),
pod-link($c.name, "/type/{uri_escape ~$c}"),
", which does role ",
pod-link($r.name, "/type/$r"),
pod-link($r.name, "/type/{uri_escape ~$r}"),
", which provides the following methods:",
),
%methods-by-type{$r}.list,
Expand Down
2 changes: 1 addition & 1 deletion lib/Perl6/Documentable.pm
Expand Up @@ -35,7 +35,7 @@ class Perl6::Documentable {
method url() {
$!url //= $.kind eq 'operator'
?? "/language/operators#" ~ uri_escape("@.subkinds[] $.name".subst(/\s+/, '_', :g))
!! "/$.kind/$.name"
!! ("", $.kind, $.name).map(&uri_escape).join('/')
;
}
method categories() {
Expand Down

0 comments on commit aa56705

Please sign in to comment.