projects
/
php-utility-classes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71771b0
)
deal with empty link value
author
Robert Kaiser
<kairo@kairo.at>
Sun, 2 Sep 2018 18:12:52 +0000
(20:12 +0200)
committer
Robert Kaiser
<kairo@kairo.at>
Sun, 2 Sep 2018 18:12:52 +0000
(20:12 +0200)
classes/document.php-class
patch
|
blob
|
blame
|
history
diff --git
a/classes/document.php-class
b/classes/document.php-class
index 5a60615b7189eac910f8f245ce4bad86954eaf10..e98d292a134c8f256c5c60f6c6f0ea3372b5fb5e 100755
(executable)
--- a/
classes/document.php-class
+++ b/
classes/document.php-class
@@
-335,7
+335,7
@@
class ExtendedDocument extends DOMDocument {
}
public function createElementLink($target, $value = '') {
- $link = $this->createElement('a',
$value
);
+ $link = $this->createElement('a',
(strlen($value) ? $value : $target)
);
$link->setAttribute('href', $target); // XXX: take care of & etc. in links
return $link;
}