Commit dbe88535 authored by Martin/Geno's avatar Martin/Geno Committed by JC Brand

[BUGFIX] html br

parent 2f2b2cea
...@@ -53711,7 +53711,7 @@ function _instanceof(left, right) { if (right != null && typeof Symbol !== "unde ...@@ -53711,7 +53711,7 @@ function _instanceof(left, right) { if (right != null && typeof Symbol !== "unde
}; };
u.renderNewLines = function (text) { u.renderNewLines = function (text) {
return text.replace(/\n\n+/g, '<br><br>').replace(/\n/g, '<br/>'); return text.replace(/\n\n+/g, '<br/><br/>').replace(/\n/g, '<br/>');
}; };
u.renderImageURLs = function (_converse, obj) { u.renderImageURLs = function (_converse, obj) {
...@@ -81067,7 +81067,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ ...@@ -81067,7 +81067,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}; };
u.renderNewLines = function (text) { u.renderNewLines = function (text) {
return text.replace(/\n\n+/g, '<br><br>').replace(/\n/g, '<br/>'); return text.replace(/\n\n+/g, '<br/><br/>').replace(/\n/g, '<br/>');
}; };
u.renderImageURLs = function (_converse, obj) { u.renderImageURLs = function (_converse, obj) {
...@@ -8,7 +8,7 @@ The Converse.js User Manual ...@@ -8,7 +8,7 @@ The Converse.js User Manual
.. |br| raw:: html .. |br| raw:: html
<br /> <br/>
.. figure:: images/homepage.jpg .. figure:: images/homepage.jpg
:align: right :align: right
......
...@@ -205,9 +205,9 @@ ...@@ -205,9 +205,9 @@
<p> <p>
I'm available for paid-for features, custom development and consulting.<br/> I'm available for paid-for features, custom development and consulting.<br/>
However, please don't contact me personally for free support, use However, please don't contact me personally for free support, use
the other channels mentioned above.</br></br> the other channels mentioned above.<br/><br/>
Here's my <a href="https://opkode.com/contact.html" target="_blank" rel="noopener">contact form</a>.</br> Here's my <a href="https://opkode.com/contact.html" target="_blank" rel="noopener">contact form</a>.<br/>
</p> </p>
</div> </div>
</div> </div>
......
...@@ -66,16 +66,16 @@ ...@@ -66,16 +66,16 @@
</td> </td>
<td> <td>
<a href="https://www.mozilla.org/en-US/MPL/2.0/">MPL-2.0</a> <a href="https://www.mozilla.org/en-US/MPL/2.0/">MPL-2.0</a>
<br /> <br/>
<a href="magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&amp;dn=public-domain.txt">Public-Domain</a> <a href="magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&amp;dn=public-domain.txt">Public-Domain</a>
<br /> <br/>
<a href="http://www.jclark.com/xml/copying.txt">Expat</a> <a href="http://www.jclark.com/xml/copying.txt">Expat</a>
</td> </td>
<td> <td>
<a href="https://github.com/jcbrand/converse.js/blob/master/src/converse.js">converse.js</a> <a href="https://github.com/jcbrand/converse.js/blob/master/src/converse.js">converse.js</a>
<br /> <br/>
<a href="https://github.com/jcbrand/converse.js/blob/master/3rdparty/bigint.js">bigint.js</a> <a href="https://github.com/jcbrand/converse.js/blob/master/3rdparty/bigint.js">bigint.js</a>
<br /> <br/>
<a href="https://github.com/jcbrand/converse.js/blob/master/3rdparty/lodash.fp.js">lodash.fp.js</a> <a href="https://github.com/jcbrand/converse.js/blob/master/3rdparty/lodash.fp.js">lodash.fp.js</a>
</td> </td>
</tr> </tr>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<!-- <span class="badge badge-info msgs-indicator">1</span> --> <!-- <span class="badge badge-info msgs-indicator">1</span> -->
<a href="#" <a href="#"
class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info" class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info"
data-html="true" data-content="<b>Room Address (JID): </b><br>public@conference.test.com<br><b>Discussions: </b><br>Public discussions<br><b>Participants: </b>1<br><b>Features: </b><br>Non-anonymous"> data-html="true" data-content="<b>Room Address (JID): </b><br/>public@conference.test.com<br/><b>Discussions: </b><br/>Public discussions<br/><b>Participants: </b>1<br/><b>Features: </b><br/>Non-anonymous">
&nbsp;</a> &nbsp;</a>
<a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a> <a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a>
</div> </div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<a class="list-item-link open-room available-room w-100" data-room-jid="team@conference.test.com" title="Click to open this room" href="chatroom.html">Juliet's Balcony</a> <a class="list-item-link open-room available-room w-100" data-room-jid="team@conference.test.com" title="Click to open this room" href="chatroom.html">Juliet's Balcony</a>
<a href="#" <a href="#"
class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info" class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info"
data-html="true" data-content="<b>Room Address (JID): </b><br>public@conference.test.com<br><b>Discussions: </b><br>Public discussions<br><b>Participants: </b>1<br><b>Features: </b><br>Non-anonymous"> data-html="true" data-content="<b>Room Address (JID): </b><br/>public@conference.test.com<br/><b>Discussions: </b><br/>Public discussions<br/><b>Participants: </b>1<br/><b>Features: </b><br/>Non-anonymous">
&nbsp;</a> &nbsp;</a>
<a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a> <a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a>
</div> </div>
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<!-- <span class="badge badge-info msgs-indicator">1</span> --> <!-- <span class="badge badge-info msgs-indicator">1</span> -->
<a href="#" <a href="#"
class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info" class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info"
data-html="true" data-content="<b>Room Address (JID): </b><br>public@conference.test.com<br><b>Discussions: </b><br>Public discussions<br><b>Participants: </b>1<br><b>Features: </b><br>Non-anonymous"> data-html="true" data-content="<b>Room Address (JID): </b><br/>public@conference.test.com<br/><b>Discussions: </b><br/>Public discussions<br/><b>Participants: </b>1<br/><b>Features: </b><br/>Non-anonymous">
&nbsp;</a> &nbsp;</a>
<a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a> <a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a>
</div> </div>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<a class="list-item-link open-room available-room w-100" data-room-jid="team@conference.test.com" title="Click to open this room" href="chatroom.html">Juliet's Balcony</a> <a class="list-item-link open-room available-room w-100" data-room-jid="team@conference.test.com" title="Click to open this room" href="chatroom.html">Juliet's Balcony</a>
<a href="#" <a href="#"
class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info" class="list-item-action room-info fa fa-info-circle" data-container="body" data-toggle="popover" title="Room info"
data-html="true" data-content="<b>Room Address (JID): </b><br>public@conference.test.com<br><b>Discussions: </b><br>Public discussions<br><b>Participants: </b>1<br><b>Features: </b><br>Non-anonymous"> data-html="true" data-content="<b>Room Address (JID): </b><br/>public@conference.test.com<br/><b>Discussions: </b><br/>Public discussions<br/><b>Participants: </b>1<br/><b>Features: </b><br/>Non-anonymous">
&nbsp;</a> &nbsp;</a>
<a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a> <a href="#" class="list-item-action fa fa-bookmark" title="Click to bookmark this room">&nbsp;</a>
</div> </div>
......
...@@ -953,7 +953,7 @@ ...@@ -953,7 +953,7 @@
}).then(() => { }).then(() => {
const view = _converse.chatboxviews.get(contact_jid); const view = _converse.chatboxviews.get(contact_jid);
chat_content = view.el.querySelector('.chat-content'); chat_content = view.el.querySelector('.chat-content');
expect(chat_content.querySelector('.chat-msg__text').innerHTML).toBe('Hey<br>Have you heard the news?'); expect(chat_content.querySelector('.chat-msg__text').innerHTML).toBe('Hey<br/>Have you heard the news?');
stanza = Strophe.xmlHtmlNode( stanza = Strophe.xmlHtmlNode(
"<message from='"+contact_jid+"'"+ "<message from='"+contact_jid+"'"+
...@@ -964,7 +964,7 @@ ...@@ -964,7 +964,7 @@
_converse.connection._dataRecv(test_utils.createRequest(stanza)); _converse.connection._dataRecv(test_utils.createRequest(stanza));
return test_utils.waitUntil(() => view.model.messages.length); return test_utils.waitUntil(() => view.model.messages.length);
}).then(() => { }).then(() => {
expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br><br>Have you heard the news?'); expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br/><br/>Have you heard the news?');
stanza = Strophe.xmlHtmlNode( stanza = Strophe.xmlHtmlNode(
"<message from='"+contact_jid+"'"+ "<message from='"+contact_jid+"'"+
" type='chat'"+ " type='chat'"+
...@@ -974,7 +974,7 @@ ...@@ -974,7 +974,7 @@
_converse.connection._dataRecv(test_utils.createRequest(stanza)); _converse.connection._dataRecv(test_utils.createRequest(stanza));
return test_utils.waitUntil(() => view.model.messages.length); return test_utils.waitUntil(() => view.model.messages.length);
}).then(() => { }).then(() => {
expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br>Have you heard<br>the news?'); expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br/>Have you heard<br/>the news?');
done(); done();
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)) }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL))
})); }));
......
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
}; };
u.renderNewLines = function (text) { u.renderNewLines = function (text) {
return text.replace(/\n\n+/g, '<br><br>').replace(/\n/g, '<br/>'); return text.replace(/\n\n+/g, '<br/><br/>').replace(/\n/g, '<br/>');
}; };
u.renderImageURLs = function (_converse, obj) { u.renderImageURLs = function (_converse, obj) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment