/* private */
QString KitaWriteView::resultMessage( const QString& response ) const
{
+ QRegExp tags( "(<[^<]+>|</[^<]+>)" );
+
if ( m_bbstype == Kita::Board_FlashCGI ) {
QRegExp regexp( "<blockquote>(.*)</blockquote>" );
return QString::null;
}
- QRegExp regexp( "<b>([^<]*)</b>" );
- int pos = regexp.search( response );
- if ( pos != -1 ) {
- return regexp.cap( 1 );
+ {
+ QRegExp bold_start( "<b>" );
+ QRegExp bold_end( "</b>" );
+ int startPos = bold_start.search( response );
+ if ( startPos != -1 ) {
+ startPos += 3;
+ int endPos = bold_end.search( response );
+ if ( endPos != -1 && startPos < endPos ) {
+ QString message = response.mid( startPos, endPos - startPos );
+ message.remove( tags );
+ return message;
+ }
+ }
}
QRegExp body_regexp( "<body>([^<]*)</body>" );