Merge lp://qastaging/~angeloc/unity-lens-files/fix-for-948086 into lp://qastaging/unity-lens-files

Proposed by Angelo Compagnucci
Status: Merged
Approved by: Michal Hruby
Approved revision: 225
Merged at revision: 218
Proposed branch: lp://qastaging/~angeloc/unity-lens-files/fix-for-948086
Merge into: lp://qastaging/unity-lens-files
Prerequisite: lp://qastaging/~angeloc/unity-lens-files/fix-for-773841
Diff against target: 33 lines (+15/-1)
1 file modified
src/url-checker.vala (+15/-1)
To merge this branch: bzr merge lp://qastaging/~angeloc/unity-lens-files/fix-for-948086
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Needs Fixing
Michal Hruby (community) Approve
Review via email: mp+96310@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2012-03-06.

Description of the change

More robust url validation.

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Can you please set your branch which fixes the mountable uris as a prerequisite branch for this?

review: Needs Resubmitting
Revision history for this message
Michal Hruby (mhr3) wrote :

Can we move all the TLDs into a const string, so that we'll have just:

web_regex = new Regex ("(http[s]{0,1}://.+){0,1}[a-zA-Z0-9\\-\\.]+\\." + TLD_REGEX + "$");

Also, this regex should be definitely compiled with RegexCompileFlags.OPTIMIZE

review: Needs Fixing
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Done!

Splitting regex into const string
Use OPTIMIZE flag for regexp

Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Done!

Codestyle fixed!

Revision history for this message
Michal Hruby (mhr3) wrote :

Looking good to me.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The prerequisite lp:~angeloc/unity-lens-files/fix-for-773841 has not yet been merged into lp:unity-lens-files.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Sorry, seems this branch slipped past my watchful eye

This branch caused a regression. You can no longer type in a URL with path, query, or fragment components. The regex doesn't match beyond the tld.

review: Needs Fixing
Revision history for this message
Michal Hruby (mhr3) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches