mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02: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(
|
||||
self::$api_link_base,
|
||||
$subject,
|
||||
$page->getVersion(),
|
||||
$page->getEntity()->getKey()
|
||||
urlencode($subject),
|
||||
urlencode($page->getVersion()),
|
||||
urlencode($page->getEntity()->getKey())
|
||||
);
|
||||
|
||||
$md = str_replace(
|
||||
@ -325,9 +325,9 @@ class DocumentationParser {
|
||||
$subject = $links[1][$i];
|
||||
$url = sprintf(
|
||||
self::$api_link_base,
|
||||
$subject,
|
||||
$page->getVersion(),
|
||||
$page->getEntity()->getKey()
|
||||
urlencode($subject),
|
||||
urlencode($page->getVersion()),
|
||||
urlencode($page->getEntity()->getKey())
|
||||
);
|
||||
|
||||
$md = str_replace(
|
||||
|
@ -475,7 +475,7 @@ html {
|
||||
.documentation_children li {
|
||||
float: left;
|
||||
width: 33%;
|
||||
margin: 0;
|
||||
margin: 0 0 40px;
|
||||
padding: 0 3% 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
@ -221,11 +221,13 @@ pre {
|
||||
pre code {
|
||||
background: none;
|
||||
font-weight: normal;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
code {
|
||||
font: 13px/15px Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
|
||||
background: #dff1ff;
|
||||
background: #fffde8;
|
||||
padding: 2px;
|
||||
}
|
||||
code a {
|
||||
color: #4E5661;
|
||||
|
@ -321,7 +321,7 @@ HTML;
|
||||
$result
|
||||
);
|
||||
$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
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user