Commit b3e2856d authored by jerasmus's avatar jerasmus

Address code review comments

Addressed code review comments
parent 14a1621d
......@@ -445,7 +445,6 @@ export function stripPathTail(path = '') {
return path.replace(/[^/]+$/, '');
}
export function getURLOrigin(url) {
if (!url) {
return window.location.origin;
......
......@@ -15,7 +15,7 @@ const markPrefix = `${marker}-${Date.now()}`;
const reHelpers = {
template: `.| |\\t|\\n(?!(\\n|${markPrefix}))`,
openTag: '<[^iframe]+.*?>',
openTag: '<(?!iframe)[a-zA-Z]+.*?>',
closeTag: '</.+>',
};
const reTemplated = new RegExp(`(^${wrapPrefix}(${reHelpers.template})+?${wrapPostfix}$)`, 'gm');
......
......@@ -815,7 +815,6 @@ describe('URL utility', () => {
});
});
describe('getURLOrigin', () => {
it('when no url passed, returns correct origin from window location', () => {
const origin = 'https://foo.bar';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment