summaryrefslogtreecommitdiff
path: root/src/ste/Misc.php
blob: 7118b28c4f448babfeda3203e38620cdbcb3a93e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

namespace kch42\ste;

class Misc
{
    /**
     * @param string $text
     * @return string
     */
    public static function escape_text(string $text): string
    {
        return addcslashes($text, "\r\n\t\$\0..\x1f\\\"\x7f..\xff");
    }
}