D27079: Don't escape search text in search page title

2020-02-07 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R134:9bf3f942d329: Dont escape search text in search 
page title (authored by ngraham).

REPOSITORY
  R134 Discover Software Store

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27079?vs=74948=75169

REVISION DETAIL
  https://phabricator.kde.org/D27079

AFFECTED FILES
  discover/qml/ApplicationsListPage.qml

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-07 Thread Aleix Pol Gonzalez
apol accepted this revision.
apol added a comment.
This revision is now accepted and ready to land.


  whatever

REPOSITORY
  R134 Discover Software Store

BRANCH
  show-search-text-un-escaped (branched from Plasma/5.18)

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-07 Thread Nathaniel Graham
ngraham added a comment.


  But again, what user would actually write, by hand, "potato" in the 
search field? When users type into a search field, they don't add HTML styling. 
That only happens if they're copying and pasting from another source. In this 
case, if that do that and the tags come along for the ride, I'm claiming that 
the tags are unintentional and should be stripped to reflect the user's true 
intent--which is to search for the word "potato".
  
  I feel like I'm missing something here.

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-07 Thread Aleix Pol Gonzalez
apol added a comment.


  In D27079#607311 , @ngraham wrote:
  
  > Why is that not entirely correct? The bold tags are just styling; the user 
clearly intended to search for the word "potato".
  
  
  Because the user actually wrote "potato",  it's only styling because 
you're thinking of html :)

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-07 Thread Nathaniel Graham
ngraham added a comment.


  Why is that not entirely correct? The bold tags are just styling; the user 
clearly intended to search for the word "potato".

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-07 Thread Aleix Pol Gonzalez
apol added a comment.


  So with this change, if you search "potato", you'll get as a title 
"potato". I wouldn't say that's entirely correct.

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-06 Thread Nathaniel Graham
ngraham added a comment.


  @apol ping. :)

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, 
zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-03 Thread Nathaniel Graham
ngraham updated this revision to Diff 74948.
ngraham added a comment.


  Just strip all html tags

REPOSITORY
  R134 Discover Software Store

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27079?vs=74822=74948

BRANCH
  show-search-text-un-escaped (branched from Plasma/5.18)

REVISION DETAIL
  https://phabricator.kde.org/D27079

AFFECTED FILES
  discover/qml/ApplicationsListPage.qml

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-03 Thread Aleix Pol Gonzalez
apol added a comment.


  They shouldn't that doesn't mean we should style it when they do.

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-03 Thread Nathaniel Graham
ngraham added a comment.


  Why would the user enter `my potato`?

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-02-03 Thread Aleix Pol Gonzalez
apol added a comment.


  Because if you enter `my potato` it gets styled, which shouldn't 
happen.
  
  I suggest just doing the following:
  
diff --git a/discover/qml/ApplicationsListPage.qml 
b/discover/qml/ApplicationsListPage.qml
index 4445a195..e094b667 100644
--- a/discover/qml/ApplicationsListPage.qml
+++ b/discover/qml/ApplicationsListPage.qml
@@ -52,11 +52,8 @@ DiscoverPage {
 
 function escapeHtml(unsafe) {
 return unsafe
-.replace(/&/g, "")
 .replace(//g, "")
-.replace(/"/g, "")
-.replace(/'/g, "");
+.replace(/>/g, "");
 }
 
 background: Rectangle {

REPOSITORY
  R134 Discover Software Store

REVISION DETAIL
  https://phabricator.kde.org/D27079

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart


D27079: Don't escape search text in search page title

2020-01-31 Thread Nathaniel Graham
ngraham created this revision.
ngraham added reviewers: VDG, Discover Software Store, apol.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
ngraham requested review of this revision.

REVISION SUMMARY
  Doing so makes the title display look ugly and generated a bug report. I 
can't see any
  obvious reason why we need to un-escape this text. It was added in
  ae8088d0b9bcc1baea244c5d14d4f0788a2f2b68 
 
without explanation; maybe we don't need it?
  
  @apol do you remember?
  
  BUG: 416781
  FIXED-IN: 5.18.0

TEST PLAN
  Searching still works
  
  Search terms with HTML entities in them no longer look ugly in the title:
  
  F8070324: good text.png 

REPOSITORY
  R134 Discover Software Store

BRANCH
  show-search-text-un-escaped (branched from Plasma/5.18)

REVISION DETAIL
  https://phabricator.kde.org/D27079

AFFECTED FILES
  discover/qml/ApplicationsListPage.qml

To: ngraham, #vdg, #discover_software_store, apol
Cc: plasma-devel, apol, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, 
fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, ahiemstra, mart