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

linkify vector.im URLs directly into the app, both from HTML and non-HTML messages #235

Merged
merged 4 commits into from
Mar 21, 2016

Conversation

ara4n
Copy link
Member

@ara4n ara4n commented Mar 20, 2016

No description provided.

// as if someone explicitly links to vector.im/develop and we're on vector.im/beta
// they may well be trying to get us to explicitly go to develop.
// FIXME: intercept matrix.to URLs as well.
matrixLinkify.VECTOR_URL_PATTERN = "(https?:\/\/)?" + escapeRegExp(window.location.host + window.location.pathname);
Copy link
Member

Choose a reason for hiding this comment

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

could do with a leading ^

@richvdh richvdh assigned ara4n and unassigned richvdh Mar 21, 2016
@ara4n
Copy link
Member Author

ara4n commented Mar 21, 2016

@richvdh excellent review - thanks; ptal

@ara4n ara4n assigned richvdh and unassigned ara4n Mar 21, 2016
return { tagName: 'a', attribs: { href: attribs.href, name: attribs.name } };
}
else {
return { tagName: 'a', attribs: { href: attribs.href, name: attribs.name, target: '_blank' } };
Copy link
Member

Choose a reason for hiding this comment

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

might be preferable to modify attribs['target'] in-place (as simpleTransform does) rather than hardcode a list of attributes which we preserve? Can argue this both ways though.

@richvdh
Copy link
Member

richvdh commented Mar 21, 2016

lgtm modulo minor thought

@richvdh richvdh assigned ara4n and unassigned richvdh Mar 21, 2016
ara4n added a commit that referenced this pull request Mar 21, 2016
linkify vector.im URLs directly into the app, both from HTML and non-HTML messages
@ara4n ara4n merged commit 0d31f8c into develop Mar 21, 2016
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.

2 participants