mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
FIX: API links should be urlencoded() to prevent special characters causing issues
This commit is contained in:
parent
508238a7b2
commit
f706a9d8a2
@ -298,9 +298,9 @@ class DocumentationParser {
|
|||||||
|
|
||||||
$url = sprintf(
|
$url = sprintf(
|
||||||
self::$api_link_base,
|
self::$api_link_base,
|
||||||
$subject,
|
urlencode($subject),
|
||||||
$page->getVersion(),
|
urlencode($page->getVersion()),
|
||||||
$page->getEntity()->getKey()
|
urlencode($page->getEntity()->getKey())
|
||||||
);
|
);
|
||||||
|
|
||||||
$md = str_replace(
|
$md = str_replace(
|
||||||
@ -325,9 +325,9 @@ class DocumentationParser {
|
|||||||
$subject = $links[1][$i];
|
$subject = $links[1][$i];
|
||||||
$url = sprintf(
|
$url = sprintf(
|
||||||
self::$api_link_base,
|
self::$api_link_base,
|
||||||
$subject,
|
urlencode($subject),
|
||||||
$page->getVersion(),
|
urlencode($page->getVersion()),
|
||||||
$page->getEntity()->getKey()
|
urlencode($page->getEntity()->getKey())
|
||||||
);
|
);
|
||||||
|
|
||||||
$md = str_replace(
|
$md = str_replace(
|
||||||
|
@ -475,7 +475,7 @@ html {
|
|||||||
.documentation_children li {
|
.documentation_children li {
|
||||||
float: left;
|
float: left;
|
||||||
width: 33%;
|
width: 33%;
|
||||||
margin: 0;
|
margin: 0 0 40px;
|
||||||
padding: 0 3% 0 0;
|
padding: 0 3% 0 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
@ -221,11 +221,13 @@ pre {
|
|||||||
pre code {
|
pre code {
|
||||||
background: none;
|
background: none;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
font: 13px/15px Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
|
font: 13px/15px Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
|
||||||
background: #dff1ff;
|
background: #fffde8;
|
||||||
|
padding: 2px;
|
||||||
}
|
}
|
||||||
code a {
|
code a {
|
||||||
color: #4E5661;
|
color: #4E5661;
|
||||||
|
@ -321,7 +321,7 @@ HTML;
|
|||||||
$result
|
$result
|
||||||
);
|
);
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
'[DataObject::$has_one](http://api.silverstripe.org/search/lookup/?q=DataObject::$has_one&version=2.4&module=documentationparsertest)',
|
'[DataObject::$has_one](http://api.silverstripe.org/search/lookup/?q=DataObject%3A%3A%24has_one&version=2.4&module=documentationparsertest)',
|
||||||
$result
|
$result
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user