[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

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

(no description)

File Size: 55 lines (1 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 (some YouTube URLs end with a dash due to the video ID)
- equal signs (because of "foo?bar="),
- trailing slashes,
- closing parentheses are balanced separately.

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



Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1