Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_URI.php |
— | — | @@ -80,23 +80,23 @@ |
81 | 81 | public function getShortWikiText($linked = NULL) { |
82 | 82 | //TODO: Support linking |
83 | 83 | wfDebug("\r\n getShortWikiText: ".$this->m_caption); |
84 | | - return $this->m_value; |
| 84 | + return $this->m_caption; |
85 | 85 | } |
86 | 86 | |
87 | 87 | public function getShortHTMLText($linker = NULL) { |
88 | | - return $this->getShortWikiText($linker); |
| 88 | + return htmlspecialchars($this->getShortWikiText($linker)); /// TODO: support linking |
89 | 89 | } |
90 | 90 | |
91 | 91 | public function getLongWikiText($linked = NULL) { |
92 | 92 | if (! ($this->m_error === '')){ |
93 | 93 | return ('<span class="smwwarning">' . $this->m_error . '</span>'); |
94 | 94 | } else { |
95 | | - return $this->getShortWikiText($linked); |
| 95 | + return $this->m_value; |
96 | 96 | } |
97 | 97 | } |
98 | 98 | |
99 | 99 | public function getLongHTMLText($linker = NULL) { |
100 | | - return '<span class="external free">'.$this->m_caption.'</span>'; |
| 100 | + return '<span class="external free">' . htmlspecialchars($this->m_value) . '</span>'; /// TODO support linking |
101 | 101 | } |
102 | 102 | |
103 | 103 | public function getXSDValue() { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_String.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | if (! ($this->m_error === '')){ |
57 | 57 | return ('<span class="smwwarning">' . $this->m_error . '</span>'); |
58 | 58 | } else { |
59 | | - return $this->getShortWikiText($linked); |
| 59 | + return $this->m_value; |
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | if (! ($this->m_error === '')){ |
65 | 65 | return ('<span class="smwwarning">' . $this->m_error . '</span>'); |
66 | 66 | } else { |
67 | | - return $this->getShortHTMLText($linked); |
| 67 | + return htmlspecialchars($this->m_value); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * constructor to create n-ary data value types and set their initial |
29 | 29 | * value appropriately. |
30 | 30 | * |
31 | | - * TODO: move all setup of values to parseUserValue and only call setUserValue here. |
| 31 | + * FIXME: move all setup of values to parseUserValue and only call setUserValue here. |
32 | 32 | */ |
33 | 33 | function SMWNAryValue($type, $value,$caption=false) { |
34 | 34 | $this->m_type = $type; |
— | — | @@ -92,6 +92,10 @@ |
93 | 93 | } |
94 | 94 | |
95 | 95 | public function getShortWikiText($linked = NULL) { |
| 96 | + if ($this->m_caption !== false) { |
| 97 | + return $this->m_caption; |
| 98 | + } |
| 99 | + /// TODO: beautify with (...) like LongText |
96 | 100 | $result = ''; |
97 | 101 | $first = true; |
98 | 102 | foreach ($this->m_values as $value) { |
— | — | @@ -106,7 +110,10 @@ |
107 | 111 | } |
108 | 112 | |
109 | 113 | public function getShortHTMLText($linker = NULL) { |
110 | | - /// TODO: beautify with (...) like WikiText |
| 114 | + if ($this->m_caption !== false) { |
| 115 | + return $this->m_caption; |
| 116 | + } |
| 117 | + /// TODO: beautify with (...) like LongText |
111 | 118 | $result = ''; |
112 | 119 | $first = true; |
113 | 120 | foreach ($this->m_values as $value) { |