Comments (5)
Wow, I've never seen the browser freeze up like that while processing a regex.. Will look into it.
from autolinker.js.
Hey, finally looking into this now.. lol. Hopefully will figure it out in the next day or two.
Some disccusion on it in #67
CC @puzrin
from autolinker.js.
Fixed in v0.15.0
from autolinker.js.
Thanks!
from autolinker.js.
My browser is freezing with 100% CPU right now... It happens in a content with hashtags and line break...
the content contains
#hash1
#hash2
#hash3
bla bla bla <3 #hash1↵#hash2↵#hash3
I'm trying to get the DevTools timeline.. but the browser is so freezed that is doesn't works well.. So.. In my code I go until the snippet
listOfContent.forEach(function (item, index) {
listOfContent[index].content = Autolinker.link( listOfContent[index].content, autoLinkOptions )
})
my autoLinkOptions
is:
var autoLinkOptions = {
hashtag: 'twitter',
replaceFn: function replaceHashTagLink(autolinker, match) {
if (match.getType() === 'hashtag') {
return '<a href="/resultado?q='+encodeURIComponent(match.matchedText)+'">' + match.matchedText + '</a>';
}
// remove link para twitters
if (match.getType() === 'twitter') {
return match.matchedText
}
// links completos usam target _blank
if (match.getType() === 'url' && match.urlMatchType === 'scheme') {
// URLs with scheme ex: http://teste.com ou sw://teste.com
return '<a target="_blank" href="'+match.url+'">' + match.matchedText + '</a>';
} else {
// urls without scheme ex: teste.com
return match.matchedText
}
}
}
Any idea how I can fix it?
from autolinker.js.
Related Issues (20)
- 3 seconds to parse link in safari HOT 7
- Request: Add taiwanese style phone number format
- URL with multiple email addresses in query string is not linked correctly
- Autolinker vulnerable to RTLO URL spoofing attacks HOT 26
- Bug: getUrl method not working correctly for links in markdown formats HOT 1
- doc/release v3.16.0 changelog missing HOT 1
- urls.wwwMatches usecase HOT 4
- Links with `¬` in query string are broken
- encoded email address is split
- Wrong result when parsing CJK(中文/日文/韩文) char followed by colon HOT 1
- Failed to parse source map HOT 2
- Add support for YouTube hashtags HOT 1
- Add support for YouTube mentions HOT 1
- Url with protocol prefixed with emoji being incorrectly parsed HOT 1
- Help to create Markdown Link Matcher
- Enable `inlineSources`
- URL as value in key-value pair parsed only partially (and incorrectly)
- [Tiktok mentions] - parsing does not match tiktok mention behaviour HOT 2
- Detection If a Persian word is attached before the link
- Help fix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autolinker.js.