[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Plugins/Autolink/ -> Parser.js (summary)

(no description)

File Size: 55 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 functions

  linkifyUrl()
  trimUrl()

Functions
Functions that are not part of a class:

linkifyUrl(tagPos, url)   X-Ref
Linkify given URL at given position

param: {number} tagPos URL's position in the text
param: {string} url    URL

trimUrl(url)   X-Ref
Remove trailing punctuation from given URL

We remove most ASCII non-letters from the end of the string.
Exceptions:
- dashes and underscores, (base64 IDs could end with one)
- equal signs, (because of "foo?bar=")
- plus signs, (used by some file share services to force download)
- trailing slashes,
- closing parentheses. (they are balanced separately)

param: {string} url Original URL
return: {string}     Trimmed URL



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1