html errors on parsing are suppressed, but shown in todo, html errors fixed

This commit is contained in:
Ulf Gebhardt 2015-04-10 05:40:46 +02:00
parent c1be68fd9c
commit 6ef35406ed
3 changed files with 7 additions and 2 deletions

View File

@ -14,8 +14,12 @@ abstract class api_default extends api_system {
parse_str(\parse_url($row['url'],PHP_URL_QUERY), $params);
$class = static::get_class($params);
if($class){
$frag->loadHTML(\SYSTEM\API\api::run('\SYSTEM\API\verify', $class, static::get_params($params), static::get_apigroup(), true, false));
\libxml_use_internal_errors(true);
$frag->loadHTML(\SYSTEM\API\api::run('\SYSTEM\API\verify', $class, static::get_params($params), static::get_apigroup(), true, false));
$html->getElementById(substr($row['div'], 1))->appendChild($html->importNode($frag->documentElement, true));
if($error = \libxml_get_last_error()){
new \SYSTEM\LOG\ERROR('Parse Error: '.$error->message.' line:'.$error->line.' html: '.$html->saveHTML());}
\libxml_clear_errors();
//Load subpage css
foreach($row['css'] as $css){
$css_frag = new \DOMDocument();

View File

@ -68,6 +68,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule {
$row['time_elapsed'] = self::time_elapsed_string(strtotime($row['time']));
$row['state_string'] = self::state($row['count']);
$row['state_btn'] = self::statebtn($row['count']);
$row['message'] = htmlspecialchars($row['message']);
$row['request_uri'] = htmlspecialchars($row['request_uri']);
$row['openclose'] = 'open';
if($row['type'] == \SYSTEM\DBD\system_todo::FIELD_TYPE_USER){

View File

@ -1,4 +1,4 @@
<tr class="sai_todo_element ${class_row}" todo="${ID}">
<tr class="sai_todo_element ${class_row}" onClick="system.load('todo(todo${openclose});todo.${ID}');">
<td>${time_elapsed}</td>
<td>${class}</td>
<td style="word-break: break-all;">${message}</td>