Commit 721c7de6 authored by Barnaby Walters's avatar Barnaby Walters

Fixed a bug causing multiple values to appear on classic mf parsed elements, updated readme

parent 02fdfbd5
......@@ -819,7 +819,7 @@ class Parser {
foreach ($this->classicPropertyMap as $oldRoot => $properties) {
$newRoot = $this->classicRootMap[$oldRoot];
foreach ($properties as $old => $new) {
foreach ($xp->query('//*[contains(concat(" ", @class, " "), " ' . $oldRoot . ' ")]//*[contains(concat(" ", @class, " "), " ' . $old . ' ") and not(contains(concat(" ", @class, " "), " ' . $newRoot . ' "))]') as $el) {
foreach ($xp->query('//*[contains(concat(" ", @class, " "), " ' . $oldRoot . ' ")]//*[contains(concat(" ", @class, " "), " ' . $old . ' ") and not(contains(concat(" ", @class, " "), " ' . $new . ' "))]') as $el) {
$el->setAttribute('class', str_replace(' ' . $old . ' ', ' ', ' ' . $el->getAttribute('class') . ' ' . $new . ' '));
}
}
......
......@@ -188,6 +188,7 @@ php-mf2 can also be hooked up to the official, cross-platform [microformats2 tes
#### v0.2.2
* Made resolveUrl method public, allowing advanced parsers and subclasses to make use of it
* Fixed bug causing multiple duplicate property values to appear
#### v0.2.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment