Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 99a8f41

Browse files
committed
�Remove [link], mostly Maintenance upgrade. Some security fixes
1 parent b39eb72 commit 99a8f41

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

javascript.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sf.tags = [
3737
"name": "code",
3838
"tag": "code",
3939
"src": "https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/icons/Editor/code-view.svg",
40-
"fillers": ["```", "```"],
40+
"fillers": ["`", "`"],
4141
"formatter": function(part1, part2) {
4242
return "<code>" + part2 + "</code>";
4343
}
@@ -57,12 +57,15 @@ sf.tags = [
5757
"src": "https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/icons/Design/paint-brush-line.svg",
5858
"fillers": ["[color=red]", "[/color]"],
5959
"formatter": function(part1, part2) {
60+
part1 = part1.replace(/[^a-zA-Z0-9\#\(\)\,]/g, ""); // Strip chars for security
61+
console.log(part1);
6062
return "<span style='color:" + part1 + "'>" + part2 + "</span>";
6163
}
6264
},
6365
{
6466
"name": "link",
6567
"tag": "link",
68+
"dontshow": true,
6669
"src": "https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/icons/Editor/link.svg",
6770
"fillers": ["[link=URLHERE]", "[/link]"],
6871
"formatter": function(part1, part2) {
@@ -75,7 +78,7 @@ sf.tags = [
7578
"dontshow": true,
7679
"fillers": ["[easteregg]"],
7780
"formatter": function(part1, part2) {
78-
return "<a href='http://frypup.is-great.net/'>( ͡° ͜ʖ ͡°)</a>";
81+
return "( ͡° ͜ʖ ͡°)";
7982
}
8083
},
8184
{
@@ -86,7 +89,7 @@ sf.tags = [
8689
}
8790
];
8891

89-
// Firstly, initialize the formatter, and its icons.
92+
// First, initialize the formatter, and its icons.
9093
// This is executed on the next block
9194
sf.init = function() {
9295
var textareaFinder = "[name=compose-comment],[name=content]";
@@ -190,7 +193,7 @@ sf.init = function() {
190193
}
191194

192195
// Simply a .5 second timer after page load. JS onload doesn't seem
193-
// to work very well.
196+
// to work very well here.
194197
setTimeout(function() {
195198
var messages = document.getElementsByClassName("comment-text");
196199
if (messages.length == 0) {

popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
when you click on them.
3333
</p>
3434
<p>
35-
Made by <a href="https://scratch.mit.edu/users/pufflegamerz" target="_newtab">@pufflegamerz</a>.
35+
ScratchFormat Copyright 2017-2020, by the Scratchformat Contributors.
3636
<br>
3737
This is open-source. See <a href="https://github.com/ScratchFormat/" target="_newtab">Our Github</a>.
3838
</p>

0 commit comments

Comments
 (0)