4teamwork / ftw.linkchecker

0 stars 0 forks source link

Use Plone standard regex for resolveuids #30

Closed busykoala closed 5 years ago

busykoala commented 5 years ago

You could use the regex from plone, which directly extracts the uid: resolveuid_re = re.compile('^[./]*resolve[Uu]id/([^/]*)/?(.*)$')

For referene: https://github.com/plone/plone.outputfilters/blob/master/plone/outputfilters/filters/resolveuid_and_caption.py#L38

Originally posted by @maethu in https://github.com/4teamwork/ftw.linkchecker/pull/23

busykoala commented 5 years ago

I tested that and it will not work in case someone adds a link on the site root plus the pages uid like /99999999999999999999999999999999. Therefore I'll gonna leave it like that if no reason comes up speaking against that.