Removing vanilla encodeURIComponent, doing it manually for better control
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
import React, { memo } from 'react';
|
||||
import Link from './Link';
|
||||
import { uriType as uriTypeHelper } from '../util/helpers';
|
||||
import { encodeUri } from '../util/format';
|
||||
|
||||
export default memo((props) => {
|
||||
let to = null;
|
||||
let { uri, type } = props;
|
||||
const uriType = type || uriTypeHelper(uri);
|
||||
if (!props.unencoded) {
|
||||
uri = encodeURIComponent(uri);
|
||||
uri = encodeUri(uri);
|
||||
}
|
||||
|
||||
switch (uriType) {
|
||||
|
||||
Reference in New Issue
Block a user