Index: trunk/extensions/SemanticResultFormats/Timeline/SRF_Timeline.php |
— | — | @@ -166,7 +166,11 @@ |
167 | 167 | // FIXME: Timeline scripts should support XSD format explicitly. They |
168 | 168 | // currently seem to implement iso8601 which deviates from XSD in cases. |
169 | 169 | // NOTE: We can assume $object to be an SMWDataValue in this case. |
170 | | - $curmeta .= '<span class="smwtlstart">' . $object->getXMLSchemaDate() . '</span>'; |
| 170 | + $curmeta .= Html::element( |
| 171 | + 'span', |
| 172 | + array( 'class' => 'smwtlstart' ), |
| 173 | + $object->getXMLSchemaDate() |
| 174 | + ); |
171 | 175 | $positions[$object->getHash()] = $object->getXMLSchemaDate(); |
172 | 176 | $hastime = true; |
173 | 177 | } |
— | — | @@ -175,7 +179,11 @@ |
176 | 180 | if ( ( $pr->getMode() == SMWPrintRequest::PRINT_PROP ) && |
177 | 181 | ( $date_value == $this->m_tlend ) ) { |
178 | 182 | // NOTE: We can assume $object to be an SMWDataValue in this case. |
179 | | - $curmeta .= '<span class="smwtlend">' . $object->getXMLSchemaDate( false ) . '</span>'; |
| 183 | + $curmeta .= Html::element( |
| 184 | + 'span', |
| 185 | + array( 'class' => 'smwtlend' ), |
| 186 | + $object->getXMLSchemaDate( false ) |
| 187 | + ); |
180 | 188 | } |
181 | 189 | |
182 | 190 | // find title for displaying event |
— | — | @@ -206,10 +214,18 @@ |
207 | 215 | |
208 | 216 | if ( $eventline && ( $pr->getMode() == SMWPrintRequest::PRINT_PROP ) && ( $pr->getTypeID() == '_dat' ) && ( '' != $pr->getLabel() ) && ( $date_value != $this->m_tlstart ) && ( $date_value != $this->m_tlend ) ) { |
209 | 217 | if ( method_exists( $object, 'getValueKey' ) ) { |
210 | | - $events[] = array( $object->getXMLSchemaDate(), $pr->getLabel(), $object->getValueKey() ); |
| 218 | + $events[] = array( |
| 219 | + $object->getXMLSchemaDate(), |
| 220 | + $pr->getLabel(), |
| 221 | + $object->getValueKey() |
| 222 | + ); |
211 | 223 | } |
212 | 224 | else { |
213 | | - $events[] = array( $object->getXMLSchemaDate(), $pr->getLabel(), $object->getNumericValue() ); |
| 225 | + $events[] = array( |
| 226 | + $object->getXMLSchemaDate(), |
| 227 | + $pr->getLabel(), |
| 228 | + $object->getNumericValue() |
| 229 | + ); |
214 | 230 | } |
215 | 231 | } |
216 | 232 | $first_value = false; |
— | — | @@ -221,7 +237,15 @@ |
222 | 238 | } |
223 | 239 | |
224 | 240 | if ( $hastime ) { |
225 | | - $result .= '<span class="smwtlevent">' . $curmeta . '<span class="smwtlcoloricon">' . $curcolor . '</span>' . $curdata . '</span>'; |
| 241 | + $result .= Html::rawElement( |
| 242 | + 'span', |
| 243 | + array( 'class' => 'smwtlevent' ), |
| 244 | + $curmeta . Html::element( |
| 245 | + 'span', |
| 246 | + array( 'class' => 'smwtlcoloricon' ), |
| 247 | + $curcolor |
| 248 | + ) . $curdata |
| 249 | + ); |
226 | 250 | } |
227 | 251 | |
228 | 252 | if ( $eventline ) { |