fixed link passed issue due to usin self-closign links (Patch from Asamk #3418941)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4631 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-10-05 16:57:33 +00:00
parent 15758578e0
commit 6addc80e99
9 changed files with 18 additions and 18 deletions

View File

@ -1173,7 +1173,7 @@ QString RSLinkClipboard::toHtml()
QString res ;
for(int i = 0; i < links.size(); ++i)
res += links[i].toHtml() + "<br/>" ;
res += links[i].toHtml() + "<br>" ;
return res ;
}
@ -1185,7 +1185,7 @@ QString RSLinkClipboard::toHtmlFull()
QString res ;
for(int i = 0; i < links.size(); ++i)
res += links[i].toHtmlFull() + "<br/>" ;
res += links[i].toHtmlFull() + "<br>" ;
return res ;
}

View File

@ -117,10 +117,10 @@ void CreateChannelMsg::pasteLink()
if(!not_have.empty())
{
QString msg = tr("Channel security policy prevents you from posting files that you don't have. If you have these files, you need to share them before, or attach them explicitly:")+"<br/><br/>" ;
QString msg = tr("Channel security policy prevents you from posting files that you don't have. If you have these files, you need to share them before, or attach them explicitly:")+"<br><br>" ;
for(QList<RetroShareLink>::const_iterator it(not_have.begin());it!=not_have.end();++it)
msg += (*it).toString() + "<br/>" ;
msg += (*it).toString() + "<br>" ;
QMessageBox::warning(NULL,tr("You can only post files that you do have"),msg) ;
}

View File

@ -301,7 +301,7 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
// {
// i.next();
// foreach(QString code, i.key().split("|"))
// message.replace(code, "<img src=\"" + i.value() + "\" />");
// message.replace(code, "<img src=\"" + i.value() + "\">");
// }
// }

View File

@ -204,7 +204,7 @@ void Emoticons::formatText(QString &text)
while(i.hasNext()) {
i.next();
foreach (QString code, i.key().split("|")) {
text.replace(code, "<img src=\"" + i.value() + "\" />");
text.replace(code, "<img src=\"" + i.value() + "\">");
}
}
}

View File

@ -29,14 +29,14 @@
#include "html.h"
/** Wraps a string in "<p>" tags, converts "\n" to "<br/>" and converts "\n\n"
/** Wraps a string in "<p>" tags, converts "\n" to "<br>" and converts "\n\n"
* to a new paragraph. */
QString
p(QString str)
{
str = "<p>" + str + "</p>";
str.replace("\n\n", "</p><p>");
str.replace("\n", "<br/>");
str.replace("\n", "<br>");
return str;
}

View File

@ -32,7 +32,7 @@
#include <QString>
/** Wraps a string in "<p>" tags, converts "\n" to "<br/>" and converts "\n\n"
/** Wraps a string in "<p>" tags, converts "\n" to "<br>" and converts "\n\n"
* to a new paragraph. */
QString p(QString str);

View File

@ -1102,9 +1102,9 @@ void MessageComposer::insertTitleText(const QString &title, enumMessageType typ
void MessageComposer::insertPastedText(QString msg)
{
msg.replace("\n", "\n<BR/>> ");
msg.replace("\n", "\n<BR>> ");
ui.msgText->setHtml("<HTML><font color=\"blue\"> > " + msg + "</font><br/><br/></HTML>");
ui.msgText->setHtml("<HTML><font color=\"blue\"> > " + msg + "</font><br><br></HTML>");
ui.msgText->setFocus( Qt::OtherFocusReason );
@ -1117,9 +1117,9 @@ void MessageComposer::insertPastedText(QString msg)
void MessageComposer::insertForwardPastedText(QString msg)
{
msg.replace("\n", "\n<BR/>> ");
msg.replace("\n", "\n<BR>> ");
ui.msgText->setHtml("<HTML><blockquote [type=cite]><font color=\"blue\">> " + msg + "</font><br/><br/></blockquote></HTML>");
ui.msgText->setHtml("<HTML><blockquote [type=cite]><font color=\"blue\">> " + msg + "</font><br><br></blockquote></HTML>");
ui.msgText->setFocus( Qt::OtherFocusReason );
@ -2132,8 +2132,8 @@ void MessageComposer::addImage()
void MessageComposer::Create_New_Image_Tag( const QString urlremoteorlocal )
{
/*if (image_extension(urlremoteorlocal)) {*/
QString subtext = QString("<p><img src=\"%1\" />").arg(urlremoteorlocal);
///////////subtext.append("<br/><br/>Description on image.</p>");
QString subtext = QString("<p><img src=\"%1\">").arg(urlremoteorlocal);
///////////subtext.append("<br><br>Description on image.</p>");
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
ui.msgText->textCursor().insertFragment(fragment);
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));

View File

@ -104,7 +104,7 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
text = "" ;
for(uint i=0;i<dirs.size();++i)
text += "<b>"+QString::fromStdString(dirs[i]) + "</b><br/>" ;
text += "<b>"+QString::fromStdString(dirs[i]) + "</b><br>" ;
ui._lookupDirectories_TB->setHtml(text) ;
}

View File

@ -914,8 +914,8 @@ void CreateBlogMsg::addImage()
void CreateBlogMsg::Create_New_Image_Tag( const QString urlremoteorlocal )
{
/*if (image_extension(urlremoteorlocal)) {*/
QString subtext = QString("<p><img src=\"%1\" />").arg(urlremoteorlocal);
///////////subtext.append("<br/><br/>Description on image.</p>");
QString subtext = QString("<p><img src=\"%1\">").arg(urlremoteorlocal);
///////////subtext.append("<br><br>Description on image.</p>");
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
ui.msgEdit->textCursor().insertFragment(fragment);
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));