various fixes for the blog including prismjs highlighting, colour schemes and embedding media
🚀 Deploy website on push / 🎉 Deploy (push) Failing after 25s
🚀 Deploy website on push / 🎉 Deploy (push) Failing after 25s
Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
Vendored
+3
-1
@@ -674,6 +674,7 @@ EOD;
|
||||
public function changeHTMLSrc(string $body, string $to, string $from): string
|
||||
{
|
||||
$htmlDoc = new DOMDocument();
|
||||
$body = mb_convert_encoding($body, "HTML-ENTITIES", "UTF-8");
|
||||
$htmlDoc->loadHTML($body, LIBXML_NOERROR);
|
||||
$doc = $htmlDoc->getElementsByTagName('body')->item(0);
|
||||
$imgs = $doc->getElementsByTagName('img');
|
||||
@@ -708,7 +709,8 @@ EOD;
|
||||
$newBody = '';
|
||||
foreach ($doc->childNodes as $node)
|
||||
{
|
||||
$newBody .= $htmlDoc->saveHTML($node);
|
||||
$newHTML = $htmlDoc->saveHTML($node);
|
||||
$newBody .= mb_convert_encoding($newHTML, "UTF-8", mb_detect_encoding($newHTML));
|
||||
}
|
||||
return $newBody;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -181,7 +181,7 @@ class userRoutes implements routesInterface
|
||||
$inactive = 60 * 60 * 48; // 2 days
|
||||
$_SESSION["timeout"] = time() + $inactive;
|
||||
|
||||
return $response->withHeader("Location", "https://rohitpai.co.uk/editor/editor.html")->withStatus(302);
|
||||
return $response->withHeader("Location", "https://rohitpai.co.uk/editor/")->withStatus(302);
|
||||
}
|
||||
|
||||
$response->getBody()->write(json_encode(array("error" => "Unauthorised")));
|
||||
|
||||
Reference in New Issue
Block a user