summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-03-10 14:36:13 (UTC)
committer zautrix <zautrix>2005-03-10 14:36:13 (UTC)
commit34f5a1b758adb98c466ae8e45c9d980d62dfc544 (patch) (unidiff)
tree1ba10eac4df592da4b284bae029a864e40314d18 /libkcal
parentb96161e4dd7fc19eea87257c2455b85420dad35a (diff)
downloadkdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.zip
kdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.tar.gz
kdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.tar.bz2
htmal tag fix
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/kincidenceformatter.cpp35
-rw-r--r--libkcal/kincidenceformatter.h1
2 files changed, 26 insertions, 10 deletions
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 1751ae3..57a9ede 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -53,3 +53,3 @@ void KIncidenceFormatter::setEvent(Event *event)
53 if ( mode == 0 ) { 53 if ( mode == 0 ) {
54 addTag("h3",event->summary()); 54 addTag("h3",deTag(event->summary()));
55 } 55 }
@@ -64,5 +64,5 @@ void KIncidenceFormatter::setEvent(Event *event)
64 if ( mode == 1 ) { 64 if ( mode == 1 ) {
65 addTag("h2",i18n( "Local: " ) +event->summary()); 65 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
66 } else { 66 } else {
67 addTag("h2",i18n( "Remote: " ) +event->summary()); 67 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
68 } 68 }
@@ -80,3 +80,3 @@ void KIncidenceFormatter::setEvent(Event *event)
80 addTag("b",i18n("Location: ")); 80 addTag("b",i18n("Location: "));
81 mText.append(event->location()+"<br>"); 81 mText.append(deTag(event->location())+"<br>");
82 } 82 }
@@ -146,3 +146,3 @@ void KIncidenceFormatter::setEvent(Event *event)
146 addTag("p",i18n("<b>Details: </b>")); 146 addTag("p",i18n("<b>Details: </b>"));
147 addTag("p",event->description()); 147 addTag("p",deTag(event->description()));
148 } 148 }
@@ -172,3 +172,3 @@ void KIncidenceFormatter::setTodo(Todo *event )
172 if (mode == 0 ) 172 if (mode == 0 )
173 addTag("h3",event->summary()); 173 addTag("h3",deTag(event->summary()));
174 else { 174 else {
@@ -181,5 +181,5 @@ void KIncidenceFormatter::setTodo(Todo *event )
181 if ( mode == 1 ) { 181 if ( mode == 1 ) {
182 addTag("h2",i18n( "Local: " ) +event->summary()); 182 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
183 } else { 183 } else {
184 addTag("h2",i18n( "Remote: " ) +event->summary()); 184 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
185 } 185 }
@@ -206,3 +206,3 @@ void KIncidenceFormatter::setTodo(Todo *event )
206 addTag("b",i18n("Location: ")); 206 addTag("b",i18n("Location: "));
207 mText.append(event->location()+"<br>"); 207 mText.append(deTag(event->location())+"<br>");
208 } 208 }
@@ -231,3 +231,3 @@ void KIncidenceFormatter::setTodo(Todo *event )
231 addTag("p",i18n("<b>Details: </b>")); 231 addTag("p",i18n("<b>Details: </b>"));
232 addTag("p",event->description()); 232 addTag("p",deTag(event->description()));
233 } 233 }
@@ -378 +378,16 @@ void KIncidenceFormatter::formatReadOnly(Incidence *event)
378} 378}
379QString KIncidenceFormatter::deTag(QString text)
380{
381#if QT_VERSION >= 0x030000
382 text.replace( '<' , "&lt;" );
383 text.replace( '>' , "&gt;" );
384#else
385 if ( text.find ('<') > 0 ) {
386 text.replace( QRegExp("<") , "&lt;" );
387 }
388 if ( text.find ('>') > 0 ) {
389 text.replace( QRegExp(">") , "&gt;" );
390 }
391#endif
392 return text;
393}
diff --git a/libkcal/kincidenceformatter.h b/libkcal/kincidenceformatter.h
index 068e6d2..b5603e0 100644
--- a/libkcal/kincidenceformatter.h
+++ b/libkcal/kincidenceformatter.h
@@ -34,2 +34,3 @@ class KIncidenceFormatter : public QObject
34 private: 34 private:
35 QString deTag(QString text);
35 bool mSyncMode; 36 bool mSyncMode;