FIRE-20054: Only update link's HREF to label text if the user can edit the text

meow-7.2.2
Ansariel 2016-09-06 23:40:49 +02:00
parent d52a5c73bf
commit 83865d408b
1 changed files with 4 additions and 1 deletions

View File

@ -2633,7 +2633,10 @@ void LLTextEditor::updateLinkSegments()
// if the link's label (what the user can edit) is a valid Url,
// then update the link's HREF to be the same as the label text.
// This lets users edit Urls in-place.
if (LLUrlRegistry::instance().hasUrl(url_label))
// <FS:Ansariel> FIRE-20054: Only update link's HREF to label text if the user can edit the text
//if (LLUrlRegistry::instance().hasUrl(url_label))
if (LLUrlRegistry::instance().hasUrl(url_label) && !getReadOnly())
// </FS:Ansariel>
{
std::string new_url = wstring_to_utf8str(url_label);
LLStringUtil::trim(new_url);