You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

html.go 571 B

12345678910111213141516171819
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package common
  5. import (
  6. "mvdan.cc/xurls/v2"
  7. )
  8. var (
  9. // NOTE: All below regex matching do not perform any extra validation.
  10. // Thus a link is produced even if the linked entity does not exist.
  11. // While fast, this is also incorrect and lead to false positives.
  12. // TODO: fix invalid linking issue
  13. // LinkRegex is a regexp matching a valid link
  14. LinkRegex, _ = xurls.StrictMatchingScheme("https?://")
  15. )