summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircoutput.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircoutput.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircoutput.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircoutput.cpp b/noncore/net/opieirc/ircoutput.cpp
index 878bc9b..4822fc4 100644
--- a/noncore/net/opieirc/ircoutput.cpp
+++ b/noncore/net/opieirc/ircoutput.cpp
@@ -5,25 +5,29 @@ IRCOutput::IRCOutput(IRCOutputType type, QString message) {
5 m_message = message; 5 m_message = message;
6} 6}
7 7
8IRCOutputType IRCOutput::type() { 8IRCOutputType IRCOutput::type() {
9 return m_type; 9 return m_type;
10} 10}
11 11
12QString IRCOutput::message() { 12QString IRCOutput::message() {
13 return m_message; 13 return m_message;
14} 14}
15 15
16QString IRCOutput::htmlMessage() { 16QString IRCOutput::htmlMessage() {
17 QString htmlMessage =m_message.replace(QRegExp("&"), "&"); 17 return toHTML(m_message);
18}
19
20QString IRCOutput::toHTML(QString message) {
21 QString htmlMessage =message.replace(QRegExp("&"), "&");
18 htmlMessage = htmlMessage.replace(QRegExp(">"), ">"); 22 htmlMessage = htmlMessage.replace(QRegExp(">"), ">");
19 htmlMessage = htmlMessage.replace(QRegExp("<"), "&lt;"); 23 htmlMessage = htmlMessage.replace(QRegExp("<"), "&lt;");
20 return htmlMessage; 24 return htmlMessage;
21} 25}
22 26
23void IRCOutput::addParam(void *data) { 27void IRCOutput::addParam(void *data) {
24 m_parameters.append(data); 28 m_parameters.append(data);
25} 29}
26 30
27void *IRCOutput::getParam(int index) { 31void *IRCOutput::getParam(int index) {
28 return m_parameters.at(index); 32 return m_parameters.at(index);
29} 33}