mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
15758578e0
commit
6addc80e99
@ -1173,7 +1173,7 @@ QString RSLinkClipboard::toHtml()
|
|||||||
|
|
||||||
QString res ;
|
QString res ;
|
||||||
for(int i = 0; i < links.size(); ++i)
|
for(int i = 0; i < links.size(); ++i)
|
||||||
res += links[i].toHtml() + "<br/>" ;
|
res += links[i].toHtml() + "<br>" ;
|
||||||
|
|
||||||
return res ;
|
return res ;
|
||||||
}
|
}
|
||||||
@ -1185,7 +1185,7 @@ QString RSLinkClipboard::toHtmlFull()
|
|||||||
|
|
||||||
QString res ;
|
QString res ;
|
||||||
for(int i = 0; i < links.size(); ++i)
|
for(int i = 0; i < links.size(); ++i)
|
||||||
res += links[i].toHtmlFull() + "<br/>" ;
|
res += links[i].toHtmlFull() + "<br>" ;
|
||||||
|
|
||||||
return res ;
|
return res ;
|
||||||
}
|
}
|
||||||
|
@ -117,10 +117,10 @@ void CreateChannelMsg::pasteLink()
|
|||||||
|
|
||||||
if(!not_have.empty())
|
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)
|
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) ;
|
QMessageBox::warning(NULL,tr("You can only post files that you do have"),msg) ;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,7 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
|
|||||||
// {
|
// {
|
||||||
// i.next();
|
// i.next();
|
||||||
// foreach(QString code, i.key().split("|"))
|
// foreach(QString code, i.key().split("|"))
|
||||||
// message.replace(code, "<img src=\"" + i.value() + "\" />");
|
// message.replace(code, "<img src=\"" + i.value() + "\">");
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void Emoticons::formatText(QString &text)
|
|||||||
while(i.hasNext()) {
|
while(i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
foreach (QString code, i.key().split("|")) {
|
foreach (QString code, i.key().split("|")) {
|
||||||
text.replace(code, "<img src=\"" + i.value() + "\" />");
|
text.replace(code, "<img src=\"" + i.value() + "\">");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,14 @@
|
|||||||
#include "html.h"
|
#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. */
|
* to a new paragraph. */
|
||||||
QString
|
QString
|
||||||
p(QString str)
|
p(QString str)
|
||||||
{
|
{
|
||||||
str = "<p>" + str + "</p>";
|
str = "<p>" + str + "</p>";
|
||||||
str.replace("\n\n", "</p><p>");
|
str.replace("\n\n", "</p><p>");
|
||||||
str.replace("\n", "<br/>");
|
str.replace("\n", "<br>");
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include <QString>
|
#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. */
|
* to a new paragraph. */
|
||||||
QString p(QString str);
|
QString p(QString str);
|
||||||
|
|
||||||
|
@ -1102,9 +1102,9 @@ void MessageComposer::insertTitleText(const QString &title, enumMessageType typ
|
|||||||
|
|
||||||
void MessageComposer::insertPastedText(QString msg)
|
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 );
|
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||||
|
|
||||||
@ -1117,9 +1117,9 @@ void MessageComposer::insertPastedText(QString msg)
|
|||||||
|
|
||||||
void MessageComposer::insertForwardPastedText(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 );
|
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||||
|
|
||||||
@ -2132,8 +2132,8 @@ void MessageComposer::addImage()
|
|||||||
void MessageComposer::Create_New_Image_Tag( const QString urlremoteorlocal )
|
void MessageComposer::Create_New_Image_Tag( const QString urlremoteorlocal )
|
||||||
{
|
{
|
||||||
/*if (image_extension(urlremoteorlocal)) {*/
|
/*if (image_extension(urlremoteorlocal)) {*/
|
||||||
QString subtext = QString("<p><img src=\"%1\" />").arg(urlremoteorlocal);
|
QString subtext = QString("<p><img src=\"%1\">").arg(urlremoteorlocal);
|
||||||
///////////subtext.append("<br/><br/>Description on image.</p>");
|
///////////subtext.append("<br><br>Description on image.</p>");
|
||||||
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
|
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
|
||||||
ui.msgText->textCursor().insertFragment(fragment);
|
ui.msgText->textCursor().insertFragment(fragment);
|
||||||
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));
|
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));
|
||||||
|
@ -104,7 +104,7 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WFlags flags)
|
|||||||
text = "" ;
|
text = "" ;
|
||||||
|
|
||||||
for(uint i=0;i<dirs.size();++i)
|
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) ;
|
ui._lookupDirectories_TB->setHtml(text) ;
|
||||||
}
|
}
|
||||||
|
@ -914,8 +914,8 @@ void CreateBlogMsg::addImage()
|
|||||||
void CreateBlogMsg::Create_New_Image_Tag( const QString urlremoteorlocal )
|
void CreateBlogMsg::Create_New_Image_Tag( const QString urlremoteorlocal )
|
||||||
{
|
{
|
||||||
/*if (image_extension(urlremoteorlocal)) {*/
|
/*if (image_extension(urlremoteorlocal)) {*/
|
||||||
QString subtext = QString("<p><img src=\"%1\" />").arg(urlremoteorlocal);
|
QString subtext = QString("<p><img src=\"%1\">").arg(urlremoteorlocal);
|
||||||
///////////subtext.append("<br/><br/>Description on image.</p>");
|
///////////subtext.append("<br><br>Description on image.</p>");
|
||||||
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
|
QTextDocumentFragment fragment = QTextDocumentFragment::fromHtml(subtext);
|
||||||
ui.msgEdit->textCursor().insertFragment(fragment);
|
ui.msgEdit->textCursor().insertFragment(fragment);
|
||||||
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));
|
//emit statusMessage(QString("Image new :").arg(urlremoteorlocal));
|
||||||
|
Loading…
Reference in New Issue
Block a user