Skip to content

Commit b2b95f2

Browse files
committed
Next pass at bootstrap conversion
1 parent 2a6928d commit b2b95f2

File tree

451 files changed

+9291
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+9291
-24
lines changed

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"ext-memcached": "*",
5151
"ext-pdo": "*",
5252
"php-64bit": "^7.2",
53-
"phpmailer/phpmailer": "^6.0"
53+
"phpmailer/phpmailer": "^6.0",
54+
"erusev/parsedown": "^1.7"
5455
}
5556
}

composer.lock

+55-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libraries/Comment.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
namespace BNETDocs\Libraries;
44

5-
use \CarlBennett\MVC\Libraries\Database;
6-
use \CarlBennett\MVC\Libraries\DatabaseDriver;
75
use \BNETDocs\Libraries\Exceptions\CommentNotFoundException;
86
use \BNETDocs\Libraries\Exceptions\QueryException;
97
use \BNETDocs\Libraries\User;
108
use \CarlBennett\MVC\Libraries\Common;
11-
use \CarlBennett\MVC\Libraries\Markdown;
9+
use \CarlBennett\MVC\Libraries\Database;
10+
use \CarlBennett\MVC\Libraries\DatabaseDriver;
1211
use \DateTime;
1312
use \DateTimeZone;
1413
use \InvalidArgumentException;
1514
use \JsonSerializable;
1615
use \PDO;
1716
use \PDOException;
17+
use \Parsedown;
1818
use \StdClass;
1919

2020
class Comment implements JsonSerializable {
@@ -152,7 +152,8 @@ public function getContent($prepare) {
152152
if (!$prepare) {
153153
return $this->content;
154154
}
155-
$md = new Markdown();
155+
$md = new Parsedown();
156+
$md->setSafeMode(true); // unsafe user-input
156157
return $md->text(filter_var($this->content, FILTER_SANITIZE_FULL_SPECIAL_CHARS));
157158
}
158159

src/libraries/Document.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
namespace BNETDocs\Libraries;
44

5-
use \CarlBennett\MVC\Libraries\Database;
6-
use \CarlBennett\MVC\Libraries\DatabaseDriver;
75
use \BNETDocs\Libraries\Exceptions\DocumentNotFoundException;
86
use \BNETDocs\Libraries\Exceptions\QueryException;
97
use \BNETDocs\Libraries\User;
108
use \CarlBennett\MVC\Libraries\Common;
11-
use \CarlBennett\MVC\Libraries\Markdown;
9+
use \CarlBennett\MVC\Libraries\Database;
10+
use \CarlBennett\MVC\Libraries\DatabaseDriver;
1211
use \DateTime;
1312
use \DateTimeZone;
1413
use \InvalidArgumentException;
1514
use \PDO;
1615
use \PDOException;
16+
use \Parsedown;
1717
use \StdClass;
1818

1919
class Document {
@@ -146,7 +146,7 @@ public function getContent($prepare) {
146146
return $this->content;
147147
}
148148
if ($this->options_bitmask & self::OPTION_MARKDOWN) {
149-
$md = new Markdown();
149+
$md = new Parsedown();
150150
return $md->text($this->content);
151151
} else {
152152
return $this->content;

src/libraries/NewsPost.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
use \CarlBennett\MVC\Libraries\Common;
1111
use \CarlBennett\MVC\Libraries\Database;
1212
use \CarlBennett\MVC\Libraries\DatabaseDriver;
13-
use \CarlBennett\MVC\Libraries\Markdown;
1413
use \DateTime;
1514
use \DateTimeZone;
1615
use \InvalidArgumentException;
1716
use \PDO;
1817
use \PDOException;
18+
use \Parsedown;
1919
use \StdClass;
2020

2121
class NewsPost {
@@ -202,7 +202,7 @@ public function getContent($prepare) {
202202
return $this->content;
203203
}
204204
if ($this->options_bitmask & self::OPTION_MARKDOWN) {
205-
$md = new Markdown();
205+
$md = new Parsedown();
206206
return $md->text($this->content);
207207
} else {
208208
return htmlspecialchars($this->content, ENT_HTML5, "UTF-8");

src/libraries/Packet.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77
use \BNETDocs\Libraries\Packet\Application as ApplicationLayer;
88
use \BNETDocs\Libraries\Packet\Transport as TransportLayer;
99
use \BNETDocs\Libraries\User;
10-
1110
use \CarlBennett\MVC\Libraries\Common;
1211
use \CarlBennett\MVC\Libraries\DatabaseDriver;
13-
use \CarlBennett\MVC\Libraries\Markdown;
14-
1512
use \DateTime;
1613
use \DateTimeZone;
1714
use \InvalidArgumentException;
1815
use \JsonSerializable;
1916
use \PDO;
2017
use \PDOException;
18+
use \Parsedown;
2119
use \StdClass;
2220
use \UnexpectedValueException;
2321

@@ -321,7 +319,7 @@ public function getPacketRemarks( $prepare ) {
321319
}
322320

323321
if ( $this->options_bitmask & self::OPTION_MARKDOWN ) {
324-
$md = new Markdown();
322+
$md = new Parsedown();
325323
return $md->text($this->packet_remarks);
326324
}
327325

0 commit comments

Comments
 (0)