Allow copying text from non-message events
This commit is contained in:
@@ -163,13 +163,19 @@ QtObject {
|
||||
}
|
||||
|
||||
|
||||
function escapeHtml(string) {
|
||||
function escapeHtml(text) {
|
||||
// Replace special HTML characters by encoded alternatives
|
||||
return string.replace("&", "&")
|
||||
.replace("<", "<")
|
||||
.replace(">", ">")
|
||||
.replace('"', """)
|
||||
.replace("'", "'")
|
||||
return text.replace("&", "&")
|
||||
.replace("<", "<")
|
||||
.replace(">", ">")
|
||||
.replace('"', """)
|
||||
.replace("'", "'")
|
||||
}
|
||||
|
||||
|
||||
function stripHtmlTags(text) {
|
||||
// XXX: Potentially unsafe!
|
||||
return text.replace(/<\/?[^>]+(>|$)/g, "")
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user