Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Eth 01 cure #1422

Merged
merged 37 commits into from
Nov 19, 2016
Merged

Eth 01 cure #1422

merged 37 commits into from
Nov 19, 2016

Conversation

frozeman
Copy link
Contributor

@frozeman frozeman commented Nov 15, 2016

Fixes:

  • ETH-01-007
  • ETH-01-008
  • ETH-01-009
  • ETH-01-012
  • ETH-01-014

Preventing link click-redirects from within tabs is currently not possible due to a pending issue in electron: electron/electron#8008

One issue: If a web content is selected (clicked in a webview), then file dropping doesn't work anymore.
TODO: We can think about re-activating it or blocking it completely.

for ETH 008 and 002 see:
screen shot 2016-11-15 at 19 33 15

@alexvandesande
Copy link
Collaborator

alexvandesande commented Nov 16, 2016

This does not solve # 22 yet. I am testing and still can see it.

@frozeman
Copy link
Contributor Author

This PR is also solving the flickering of icons issue, which was cause by using {{> elements_img }} which fades images in when loaded. As the tabs where changed often and meteor seemed to "reload" the templates all the time, this lead to the flickering.

@frozeman
Copy link
Contributor Author

@alexvandesande The last PR also removed the behaviour where when you clicked in the browser bar, it selected the whole text.
This made it impossible to select parts of the URL.
If we want to have the one click connivence we have to come up with a way which doesn't block selecting text.

@frozeman
Copy link
Contributor Author

Can everybody please test now all issues again? :)
I deactivated the mist:// protocol for now, as it was never actually meant to be used yet

url = url.replace(/^((?:javascript)?(?:data)?[:\/\/]{1,3})/i, 'http://');
url = url.replace(/^[:\/\/]{1,3}/i, 'http://');

if(returnEmptyURL && /^((?:file)?(?:javascript)?(?:data)?:)/i.test(url)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex might be a better fit:
/^(?:file|javascript|data):/

bildschirmfoto 2016-11-18 um 00 07 42

instead of:
/^((?:file)?(?:javascript)?(?:data)?:)/

bildschirmfoto 2016-11-18 um 00 08 02

Perhaps we should even add the \/\/ to the end (more for completeness sake and uniformity to the other sanitizer regex).

url = String(url);

url = url.replace(/[\t\n\r\s]+/g, '');
url = url.replace(/^((?:javascript)?(?:data)?[:\/\/]{1,3})/i, 'http://');
url = url.replace(/^[:\/\/]{1,3}/i, 'http://');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks malformed:
/^[:\/\/]{1,3}/

bildschirmfoto 2016-11-18 um 00 20 50

I think you rather want "add http if empty scheme string"?
/^:\/\//

bildschirmfoto 2016-11-18 um 00 21 10



// Contains the accounts
DoogleLastVisitedPages = new Mongo.Collection('doogle-last-visted-pages', {connection: null});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally getting rid of this horrible variable name! 😜

@alexvandesande alexvandesande merged commit 5563d42 into develop Nov 19, 2016
@luclu luclu deleted the ETH-01-cure branch November 20, 2016 16:44
@luclu luclu restored the ETH-01-cure branch November 20, 2016 16:44
@evertonfraga evertonfraga modified the milestone: 0.8.8 Dec 5, 2016
@lock
Copy link

lock bot commented Mar 31, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants