user['id'] == 1 ):?> # task['id'];?> task['name'];?>
task['actions'] ) ? count( $this -> task['actions'] ) : 0; $comments_count = is_array( $this -> task['comments'] ) ? count( $this -> task['comments'] ) : 0; $attachments_count = is_array( $this -> task_attachments ) ? count( $this -> task_attachments ) : 0; $image_extensions = [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp', 'svg' ]; $popup_wiki_data = \factory\Tasks::task_wiki_entries_for_user( (int)$this -> task['id'], (int)$this -> user['id'] ); $task_wiki_entries = isset( $popup_wiki_data['entries'] ) && is_array( $popup_wiki_data['entries'] ) ? $popup_wiki_data['entries'] : []; $wiki_visible_count = isset( $popup_wiki_data['visible_count'] ) ? (int)$popup_wiki_data['visible_count'] : 0; $wiki_hidden_count = isset( $popup_wiki_data['hidden_count'] ) ? (int)$popup_wiki_data['hidden_count'] : 0; ?> task['text'] ); if ( $task_description_html !== '' ) { $task_description_html = preg_replace( '/<(script|style|iframe|object|embed|link|meta|base|form|input|button|textarea|select)\b[^>]*>.*?<\/\1>/is', '', $task_description_html ); $task_description_html = preg_replace( '/<(script|style|iframe|object|embed|link|meta|base|form|input|button|textarea|select)\b[^>]*\/?>/is', '', $task_description_html ); $task_description_html = preg_replace( '/\son[a-z]+\s*=\s*(".*?"|\'.*?\'|[^\s>]+)/i', '', $task_description_html ); $task_description_html = preg_replace( '/<(\/?)div\b[^>]*>/i', '
', $task_description_html ); $task_description_html = preg_replace( '/<(\/?)span\b[^>]*>/i', '', $task_description_html ); $task_description_html = preg_replace( '/\s(style|class|id|width|height|align|valign|border|cellpadding|cellspacing)\s*=\s*(".*?"|\'.*?\'|[^\s>]+)/i', '', $task_description_html ); $task_description_html = preg_replace_callback( '/]*>/i', function( $matches ) { if ( preg_match( '/href\s*=\s*("|\')([^"\']+)\1/i', $matches[0], $href ) ) { $url = trim( $href[2] ); if ( preg_match( '/^(https?:|mailto:|\/|#)/i', $url ) ) return ''; } return ''; }, $task_description_html ); $task_description_html = preg_replace_callback( '/]*>/i', function( $matches ) { $attrs = []; if ( preg_match( '/src\s*=\s*("|\')([^"\']+)\1/i', $matches[0], $src ) ) { $img_src = trim( $src[2] ); if ( preg_match( '/^(https?:|\/|data:image\/)/i', $img_src ) ) $attrs[] = 'src="' . htmlspecialchars( $img_src, ENT_QUOTES ) . '"'; } if ( preg_match( '/alt\s*=\s*("|\')([^"\']*)\1/i', $matches[0], $alt ) ) $attrs[] = 'alt="' . htmlspecialchars( $alt[2], ENT_QUOTES ) . '"'; if ( empty( $attrs ) ) return ''; return ''; }, $task_description_html ); $task_description_html = strip_tags( $task_description_html, '