1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-21 17:15:17 +00:00

Can create text posts

This commit is contained in:
2020-01-04 17:06:43 +01:00
parent a726ba4230
commit 037916e7eb
4 changed files with 127 additions and 5 deletions

View File

@ -45,4 +45,16 @@ export function fixEncoding(input : string) : string {
export function removeHTMLNodes(input : string) : string {
return input.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
}
/**
* Check a string before inserting it
*
* Legacy function that might be completed
* / replaced in the future
*
* @param s The string to check
*/
export function check_string_before_insert(s: string) : boolean {
return s.trim().length >= 3;
}