Subversion Repositories oidplus

Rev

Rev 511 | Rev 555 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 511 Rev 552
Line 185... Line 185...
185
        $res = my_vsprintf($res, $sprintfArgs);
185
        $res = my_vsprintf($res, $sprintfArgs);
186
 
186
 
187
        return $res;
187
        return $res;
188
}
188
}
189
 
189
 
-
 
190
function _CheckParamExists($params, $key) {
-
 
191
        if (!isset($params[$key])) throw new OIDplusException(_L('Parameter %1 is missing', $key));
-
 
192
}
-
 
193
 
190
function extractHtmlContents($cont) {
194
function extractHtmlContents($cont) {
191
        // make sure the program works even if the user provided HTML is not UTF-8
195
        // make sure the program works even if the user provided HTML is not UTF-8
192
        $cont = iconv(mb_detect_encoding($cont, mb_detect_order(), true), 'UTF-8//IGNORE', $cont);
196
        $cont = iconv(mb_detect_encoding($cont, mb_detect_order(), true), 'UTF-8//IGNORE', $cont);
193
        $bom = pack('H*','EFBBBF');
197
        $bom = pack('H*','EFBBBF');
194
        $cont = preg_replace("/^$bom/", '', $cont);
198
        $cont = preg_replace("/^$bom/", '', $cont);