Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14008830
D17162.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17162.diff
View Options
diff --git a/src/applications/phid/view/PHUIHandleListView.php b/src/applications/phid/view/PHUIHandleListView.php
--- a/src/applications/phid/view/PHUIHandleListView.php
+++ b/src/applications/phid/view/PHUIHandleListView.php
@@ -38,9 +38,13 @@
}
protected function getTagName() {
- // TODO: It would be nice to render this with a proper <ul />, at least in
- // block mode, but don't stir the waters up too much for now.
- return 'span';
+ if ($this->getAsText()) {
+ return null;
+ } else {
+ // TODO: It would be nice to render this with a proper <ul />, at least
+ // in block mode, but don't stir the waters up too much for now.
+ return 'span';
+ }
}
protected function getTagContent() {
diff --git a/src/view/AphrontTagView.php b/src/view/AphrontTagView.php
--- a/src/view/AphrontTagView.php
+++ b/src/view/AphrontTagView.php
@@ -92,6 +92,15 @@
final public function render() {
$this->willRender();
+ // A tag view may render no tag at all. For example, the HandleListView is
+ // a container which renders a tag in HTML mode, but can also render in
+ // text mode without producing a tag. When a tag view has no tag name, just
+ // return the tag content as though the view did not exist.
+ $tag_name = $this->getTagName();
+ if ($tag_name === null) {
+ return $this->getTagContent();
+ }
+
$attributes = $this->getTagAttributes();
$implode = array('class', 'sigil');
@@ -147,7 +156,7 @@
}
return javelin_tag(
- $this->getTagName(),
+ $tag_name,
$attributes,
$this->getTagContent());
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 31, 6:43 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748634
Default Alt Text
D17162.diff (1 KB)
Attached To
Mode
D17162: Remove extra container tag on HandleListViews rendering from ModularTransactions in text mode
Attached
Detach File
Event Timeline
Log In to Comment