$list[] = $word;
}
} else {
- $listType = substr($word, 1, 2);
+ $listType = mb_substr($word, 1, 2);
$listStartTag = $word;
}
if ($openListItems === 0) {
// New top-level list item
$currentListItem = array();
- $listItemType = substr($word, 1, 2);
+ $listItemType = mb_substr($word, 1, 2);
$listItemStart = $word;
} else {
$currentListItem[] = $word;
{
$filter = $type !== null ? array('<'.$type) : array('<ul', '<ol', '<dl');
- return in_array(substr($word, 0, 3), $filter);
+ return in_array(mb_substr($word, 0, 3), $filter);
}
protected function isClosingListTag($word, $type = null)
{
$filter = $type !== null ? array('</'.$type) : array('</ul', '</ol', '</dl');
- return in_array(substr($word, 0, 4), $filter);
+ return in_array(mb_substr($word, 0, 4), $filter);
}
protected function isOpeningListItemTag($word, $type = null)
{
$filter = $type !== null ? array('<'.$type) : array('<li', '<dd', '<dt');
- return in_array(substr($word, 0, 3), $filter);
+ return in_array(mb_substr($word, 0, 3), $filter);
}
protected function isClosingListItemTag($word, $type = null)
{
$filter = $type !== null ? array('</'.$type) : array('</li', '</dd', '</dt');
- return in_array(substr($word, 0, 4), $filter);
+ return in_array(mb_substr($word, 0, 4), $filter);
}
}