Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }, {
- key: "fixHTMLHelper",
- value: function fixHTMLHelper(str) {
- str = str.replace(/<a href="https?:\/\/[^>]+>https?:\/\/[^<]+<\/a>[^<$\s\n]+/ig, function (match) {
- try {
- match = match.replace(/<\/a>/ig, "") + "</a>"
- var newUrl = '"' + match.match( /(?:>)https?:\/\/[^<]+/ig )[ 0 ].substring(1);
- match = match.replace( /"https?:\/\/[^"]+/ig, newUrl );
- } catch (err) {}
- return match;
- });
- return str;
- }
- }, {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement