2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Removed text commands.

This commit is contained in:
23rd
2022-01-07 02:04:26 +03:00
committed by John Preston
parent 2af3770b29
commit e1aa08b985
14 changed files with 26 additions and 29 deletions

View File

@@ -1113,10 +1113,10 @@ TextForMimeData MediaLocation::clipboardText() const {
auto result = TextForMimeData::Simple(
qstr("[ ") + tr::lng_maps_point(tr::now) + qstr(" ]\n"));
auto titleResult = TextUtilities::ParseEntities(
TextUtilities::Clean(_title),
_title,
Ui::WebpageTextTitleOptions().flags);
auto descriptionResult = TextUtilities::ParseEntities(
TextUtilities::Clean(_description),
_description,
TextParseLinks | TextParseMultiline | TextParseRichText);
if (!titleResult.empty()) {
result.append(std::move(titleResult));

View File

@@ -3015,8 +3015,8 @@ not_null<WebPageData*> Session::webpage(
void Session::webpageApplyFields(
not_null<WebPageData*> page,
const MTPDwebPage &data) {
auto description = TextWithEntities {
TextUtilities::Clean(qs(data.vdescription().value_or_empty()))
auto description = TextWithEntities{
qs(data.vdescription().value_or_empty())
};
const auto siteName = qs(data.vsite_name().value_or_empty());
auto parseFlags = TextParseLinks | TextParseMultiline | TextParseRichText;
@@ -3191,9 +3191,9 @@ void Session::gameApplyFields(
return;
}
game->accessHash = accessHash;
game->shortName = TextUtilities::Clean(shortName);
game->shortName = shortName;
game->title = TextUtilities::SingleLine(title);
game->description = TextUtilities::Clean(description);
game->description = description;
game->photo = photo;
game->document = document;
notifyGameUpdateDelayed(game);

View File

@@ -221,14 +221,11 @@ bool WebPageData::applyChanges(
return false;
}
const auto resultUrl = TextUtilities::Clean(newUrl);
const auto resultDisplayUrl = TextUtilities::Clean(
newDisplayUrl);
const auto possibleSiteName = TextUtilities::Clean(
newSiteName);
const auto resultTitle = TextUtilities::SingleLine(
newTitle);
const auto resultAuthor = TextUtilities::Clean(newAuthor);
const auto resultUrl = newUrl;
const auto resultDisplayUrl = newDisplayUrl;
const auto possibleSiteName = newSiteName;
const auto resultTitle = TextUtilities::SingleLine(newTitle);
const auto resultAuthor = newAuthor;
const auto viewTitleText = resultTitle.isEmpty()
? TextUtilities::SingleLine(resultAuthor)