Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
bb03aed1
You need to sign in or sign up before continuing.
Commit
bb03aed1
authored
Dec 31, 2019
by
Scott Simontis
Committed by
Nicolas Giard
Dec 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: exclude tel: links from parsing #1318 (#1344)
Telephone links will no longer be incorrectly parsed as web links. Signed-off-by:
Scott Simontis
<
yo@scottsimontis.io
>
parent
3092615c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
renderer.js
server/modules/rendering/html-core/renderer.js
+3
-2
No files found.
server/modules/rendering/html-core/renderer.js
View file @
bb03aed1
...
...
@@ -39,8 +39,9 @@ module.exports = {
$
(
'a'
).
each
((
i
,
elm
)
=>
{
let
href
=
$
(
elm
).
attr
(
'href'
)
// -> Ignore empty / anchor links
if
(
!
href
||
href
.
length
<
1
||
href
.
indexOf
(
'#'
)
===
0
||
href
.
indexOf
(
'mailto:'
)
===
0
)
{
// -> Ignore empty / anchor links, e-mail addresses, and telephone numbers
if
(
!
href
||
href
.
length
<
1
||
href
.
indexOf
(
'#'
)
===
0
||
href
.
indexOf
(
'mailto:'
)
===
0
||
href
.
indexOf
(
'tel:'
)
===
0
)
{
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment