diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index b061661966..b3fb23ff88 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -25,8 +25,9 @@ var sdk = require('matrix-react-sdk') var dis = require('matrix-react-sdk/lib/dispatcher'); var linkify = require('linkifyjs'); -var linkifyElement = require('linkifyjs/element'); +var linkifyString = require('linkifyjs/string'); var linkifyMatrix = require('matrix-react-sdk/lib/linkify-matrix'); +var sanitizeHtml = require('sanitize-html'); linkifyMatrix(linkify); @@ -61,8 +62,6 @@ module.exports = React.createClass({ self.forceUpdate(); } }); - - //linkifyElement(this.refs.directory_table, linkifyMatrix.options); }, showRoom: function(roomId) { @@ -108,6 +107,9 @@ module.exports = React.createClass({ perms =
{guestRead} {guestJoin}
; } + var topic = rooms[i].topic || ''; + topic = linkifyString(sanitizeHtml(topic)); + rows.unshift( @@ -120,7 +122,9 @@ module.exports = React.createClass({
{ name }
  { perms } -
{ rooms[i].topic }
+
{ rooms[i].aliases[0] }
diff --git a/src/skins/vector/css/vector-web/structures/RoomDirectory.css b/src/skins/vector/css/vector-web/structures/RoomDirectory.css index c2c1e4d96f..a61e9e43aa 100644 --- a/src/skins/vector/css/vector-web/structures/RoomDirectory.css +++ b/src/skins/vector/css/vector-web/structures/RoomDirectory.css @@ -73,7 +73,7 @@ limitations under the License. .mx_RoomDirectory_roomAvatar { width: 24px; - padding-left: 16px; + padding-left: 12px; padding-right: 24px; vertical-align: top; } @@ -105,6 +105,7 @@ limitations under the License. } .mx_RoomDirectory_topic { + cursor: initial; } .mx_RoomDirectory_alias {