Skip to content

Commit

Permalink
Remove URI.js monkey-patch as fix landed in v1.18.5
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije authored and xPaw committed Apr 21, 2017
1 parent ed397c8 commit 72e35d1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions client/js/libs/handlebars/ircmessageparser/findLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,12 @@ const commonSchemes = [

function findLinks(text) {
let result = [];
let lastPosition = 0;

// URI.withinString() identifies URIs within text, e.g. to translate them to
// <a>-Tags.
// See https://medialize.github.io/URI.js/docs.html#static-withinString
// In our case, we store each URI encountered in a result array.
URI.withinString(text, function(url, start, end) {
// v-- fix: url was modified and does not match input string -> cant be mapped
if (text.indexOf(url, lastPosition) < 0) {
return;
}
// ^-- /fix: url was modified and does not match input string -> cant be mapped

// Extract the scheme of the URL detected, if there is one
const parsedScheme = URI(url).scheme().toLowerCase();

Expand Down

0 comments on commit 72e35d1

Please sign in to comment.