author | zautrix <zautrix> | 2005-03-10 14:36:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-10 14:36:13 (UTC) |
commit | 34f5a1b758adb98c466ae8e45c9d980d62dfc544 (patch) (unidiff) | |
tree | 1ba10eac4df592da4b284bae029a864e40314d18 | |
parent | b96161e4dd7fc19eea87257c2455b85420dad35a (diff) | |
download | kdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.zip kdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.tar.gz kdepimpi-34f5a1b758adb98c466ae8e45c9d980d62dfc544.tar.bz2 |
htmal tag fix
-rw-r--r-- | korganizer/koeventviewer.cpp | 42 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 1 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.cpp | 35 | ||||
-rw-r--r-- | libkcal/kincidenceformatter.h | 1 |
4 files changed, 55 insertions, 24 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 44da058..135ca73 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -246,3 +246,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
246 | if ( mode == 0 ) { | 246 | if ( mode == 0 ) { |
247 | addTag("h2",event->summary()); | 247 | addTag("h2",deTag(event->summary())); |
248 | } | 248 | } |
@@ -257,5 +257,5 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
257 | if ( mode == 1 ) { | 257 | if ( mode == 1 ) { |
258 | addTag("h2",i18n( "Local: " ) +event->summary()); | 258 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
259 | } else { | 259 | } else { |
260 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 260 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
261 | } | 261 | } |
@@ -275,3 +275,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
275 | addTag("b",i18n("Location: ")); | 275 | addTag("b",i18n("Location: ")); |
276 | mText.append(event->location()+"<br>"); | 276 | mText.append(deTag(event->location())+"<br>"); |
277 | mMailSubject += i18n(" at ") + event->location(); | 277 | mMailSubject += i18n(" at ") + event->location(); |
@@ -346,3 +346,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
346 | addTag("p",i18n("<b>Details: </b>")); | 346 | addTag("p",i18n("<b>Details: </b>")); |
347 | addTag("p",event->description()); | 347 | addTag("p",deTag(event->description())); |
348 | } | 348 | } |
@@ -376,3 +376,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
376 | if (mode == 0 ) | 376 | if (mode == 0 ) |
377 | addTag("h2",event->summary()); | 377 | addTag("h2",deTag(event->summary())); |
378 | else { | 378 | else { |
@@ -385,5 +385,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
385 | if ( mode == 1 ) { | 385 | if ( mode == 1 ) { |
386 | addTag("h2",i18n( "Local: " ) +event->summary()); | 386 | addTag("h2",i18n( "Local: " ) +deTag(event->summary())); |
387 | } else { | 387 | } else { |
388 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 388 | addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); |
389 | } | 389 | } |
@@ -414,3 +414,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
414 | addTag("b",i18n("Location: ")); | 414 | addTag("b",i18n("Location: ")); |
415 | mText.append(event->location()+"<br>"); | 415 | mText.append(deTag(event->location())+"<br>"); |
416 | mMailSubject += i18n(" at ") + event->location(); | 416 | mMailSubject += i18n(" at ") + event->location(); |
@@ -436,3 +436,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
436 | addTag("p",i18n("<b>Details: </b>")); | 436 | addTag("p",i18n("<b>Details: </b>")); |
437 | addTag("p",event->description()); | 437 | addTag("p",deTag(event->description())); |
438 | } | 438 | } |
@@ -449,3 +449,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
449 | addTag("b",i18n("Parent todo:<br>")); | 449 | addTag("b",i18n("Parent todo:<br>")); |
450 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 450 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
451 | } | 451 | } |
@@ -456,3 +456,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
456 | for (to=Relations.first();to;to=Relations.next()) { | 456 | for (to=Relations.first();to;to=Relations.next()) { |
457 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 457 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
458 | 458 | ||
@@ -625,3 +625,3 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) | |||
625 | if (!jour->description().isEmpty()) { | 625 | if (!jour->description().isEmpty()) { |
626 | addTag("p",jour->description()); | 626 | addTag("p",deTag(jour->description())); |
627 | } | 627 | } |
@@ -641,3 +641,2 @@ void KOEventViewer::setSyncMode( bool b ) | |||
641 | 641 | ||
642 | |||
643 | void KOEventViewer::setTodo(Todo *event, bool clearV ) | 642 | void KOEventViewer::setTodo(Todo *event, bool clearV ) |
@@ -695,2 +694,17 @@ void KOEventViewer::addText(QString text) | |||
695 | } | 694 | } |
695 | QString KOEventViewer::deTag(QString text) | ||
696 | { | ||
697 | #if QT_VERSION >= 0x030000 | ||
698 | text.replace( '<' , "<" ); | ||
699 | text.replace( '>' , ">" ); | ||
700 | #else | ||
701 | if ( text.find ('<') > 0 ) { | ||
702 | text.replace( QRegExp("<") , "<" ); | ||
703 | } | ||
704 | if ( text.find ('>') > 0 ) { | ||
705 | text.replace( QRegExp(">") , ">" ); | ||
706 | } | ||
707 | #endif | ||
708 | return text; | ||
709 | } | ||
696 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) | 710 | void KOEventViewer::keyPressEvent ( QKeyEvent * e ) |
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 2d4a08e..47cc5e9 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -67,2 +67,3 @@ class KOEventViewer : public QTextBrowser { | |||
67 | bool mSyncMode; | 67 | bool mSyncMode; |
68 | QString deTag(QString text); | ||
68 | 69 | ||
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 | } |
379 | QString KIncidenceFormatter::deTag(QString text) | ||
380 | { | ||
381 | #if QT_VERSION >= 0x030000 | ||
382 | text.replace( '<' , "<" ); | ||
383 | text.replace( '>' , ">" ); | ||
384 | #else | ||
385 | if ( text.find ('<') > 0 ) { | ||
386 | text.replace( QRegExp("<") , "<" ); | ||
387 | } | ||
388 | if ( text.find ('>') > 0 ) { | ||
389 | text.replace( QRegExp(">") , ">" ); | ||
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; |