mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-23 04:10:40 +03:00
11 lines
414 B
JavaScript
11 lines
414 B
JavaScript
|
module.exports = {
|
||
|
|
||
|
URLRegex: /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g,
|
||
|
clearContent: (content) => {
|
||
|
if (!content) return "";
|
||
|
return content.replaceAll("&", "&")
|
||
|
.replaceAll("<", "<").replaceAll(">", ">")
|
||
|
.replaceAll("\"", """).replaceAll("'", "'")
|
||
|
.replaceAll("\n", "<br>");
|
||
|
}
|
||
|
}
|