Skip to content

Commit

Permalink
use original anchor name in herf attribute for scrolling to header in…
Browse files Browse the repository at this point in the history
… wiki page
  • Loading branch information
Deardrops committed Jan 24, 2018
1 parent 4f4f563 commit 6e18759
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Libraries/OsuMarkdownProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function fixRelativeUrl()
return;
}

$src = $this->node->getUrl();
$src = urldecode($this->node->getUrl());

if (preg_match('#^(/|https?://|mailto:)#', $src) !== 1) {
$this->node->setUrl($this->config->getConfig('path').'/'.$src);
Expand Down Expand Up @@ -275,7 +275,7 @@ public function prefixUrl()
return;
}

$url = $this->node->getUrl();
$url = urldecode($this->node->getUrl());

if (starts_with($url, '/wiki/')) {
$this->node->setUrl('/help'.$url);
Expand Down Expand Up @@ -321,7 +321,7 @@ public function updateLocaleLink()
return;
}

if (preg_match('#^(\w{2}(?:-\w{2})?):(.+)$#', $this->node->getUrl(), $matches) !== 1) {
if (preg_match('#^(\w{2}(?:-\w{2})?):(.+)$#', urldecode($this->node->getUrl()), $matches) !== 1) {
return;
}

Expand Down

0 comments on commit 6e18759

Please sign in to comment.