adding unit tests

This commit is contained in:
Amine Ben hammou
2017-10-17 13:09:37 +00:00
parent 60ed294302
commit 6f80dcb1de
2 changed files with 27 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ class Image {
if(empty($element['src'])) {
return '';
}
if(substr($element['src'], 0, 1) == '/') {
if(substr($element['src'], 0, 1) == '/' && substr($element['src'], 1, 1) != '/') {
$element['src'] = get_option('siteurl') . $element['src'];
}