Progress commit: wg-qr-code

This commit is contained in:
billz
2021-03-02 23:15:47 +00:00
parent cd045a34b8
commit 6b484d383c
4 changed files with 37 additions and 2 deletions

View File

@@ -757,3 +757,11 @@ function getNightmode(){
}
}
// Sanitizes a string for QR encoding
// @param string $str
// @return string
function qr_encode($str)
{
return preg_replace('/(?<!\\\)([\":;,])/', '\\\\\1', $str);
}