Closed matthijskooijman closed 3 years ago
Looks great! :)
I've rebased this on master, and squashed the fixups. I want to go ahead and merge this even though phpdomwrapper's maintainer has not responded yet, we can always update our fix when they do.
@RoukePouw, I also noticed that in one of your commits, you removed the u
modifier on the regex, which enables UTF-8 processing. Was that intentional? It looks like having that modifier is correct, so I modified your commits to leave it now.
This adresses some problems with the comment links feature merged in #356, as discussed in https://github.com/PlanBCode/hypha/pull/356#issuecomment-743437016 onwards.
This PR contains the commits previously pushed by @RoukePouw, but I:
create
method eating up text not wrapped in a span or so. I've suggested this same fix upstream, and I'd like to hear their response before merging this here (ideally, we could just backport a fix with an upstream commit reference as we've done before). See https://github.com/scotteh/php-dom-wrapper/issues/15#issuecomment-750145412www
prefix, to prevent matching words with a dot halfway._
to the allowed characters in urls*?
matching and removed the+
from the trailing non-dot, since that would prevent a domain with three components (e.g. https://www.dewar.nl) from being matched.$suffix
variable.@RoukePouw, how does this look? If this looks ok to you and the php-dom-wrapper maintainer applies this fix upstream, I think this addresses everything?