3,7 → 3,7 |
/** |
* OID-Info.com API by Daniel Marschall, ViaThinkSoft |
* License terms: Apache 2.0 |
* Revision: 2019-08-27 |
* Revision: 2019-07-16 |
*/ |
|
error_reporting(E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED); |
204,17 → 204,10 |
return $phone; |
} |
|
private static function strip_to_xhtml_light($str, $allow_strong_text=false) { |
// <strong> is allowed in the XSD, but not <b> |
private static function strip_to_xhtml_light($str){ |
$str = str_ireplace('<b>', '<strong>', $str); |
$str = str_ireplace('</b>', '</strong>', $str); |
|
if (!$allow_strong_text) { |
// <strong> is only used for very important things like the word "deprecated". It should therefore not used for anything else |
$str = str_ireplace('<strong>', '', $str); |
$str = str_ireplace('</strong>', '', $str); |
} |
|
$str = preg_replace('@<\s*script.+<\s*/script.*>@isU', '', $str); |
$str = preg_replace('@<\s*style.+<\s*/style.*>@isU', '', $str); |
|
517,15 → 510,6 |
$elements['description'] = $this->correctDesc($elements['description'], $params, self::OIDINFO_CORRECT_DESC_DISALLOW_ENDING_DOT, true); |
$elements['information'] = $this->correctDesc($elements['information'], $params, self::OIDINFO_CORRECT_DESC_ENFORCE_ENDING_DOT, true); |
|
// Request by O.D. 26 August 2019 |
$elements['description'] = trim($elements['description']); |
if (preg_match('@^[a-z]@', $elements['description'], $m)) { |
if (($ending_dot_policy != self::OIDINFO_CORRECT_DESC_ENFORCE_ENDING_DOT) && (strpos($elements['description'], ' ') === false)) { // <-- added by DM |
$elements['description'] = '"' . $elements['description'] . '"'; |
} |
} |
// End request by O.D. 26. August 2019 |
|
if ($params['auto_extract_name'] || $params['auto_extract_url']) { |
if (!empty($elements['information'])) $elements['information'] .= '<br /><br />'; |
if ($params['auto_extract_name'] || $params['auto_extract_url']) { |