Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
denser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
denser
Merge requests
!557
Couldn't fetch the linked file.
Move hive renderer to internal packages
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Move hive renderer to internal packages
eb-move-hive-renderer-to-internal-packages
into
main
Overview
0
Commits
61
Pipelines
2
Changes
3
Merged
Efe
requested to merge
eb-move-hive-renderer-to-internal-packages
into
main
1 month ago
Overview
0
Commits
61
Pipelines
2
Changes
3
Expand
This reverts merge request
!5 (merged)
0
0
Merge request reports
Viewing commit
d5a6c33d
Prev
Next
Show latest version
3 files
+
16
−
16
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
d5a6c33d
feat: handle hive protocol in urls
· d5a6c33d
Bartłomiej Górnicki
authored
1 year ago
src/renderers/default/embedder/HtmlDOMParser.
spec.
test.ts
→
src/renderers/default/embedder/HtmlDOMParser.test.ts
+
13
−
13
Options
@@ -141,25 +141,25 @@ describe("HtmlDOMParser", () => {
});
it
(
"
should make relative links absolute with https by default
"
,
()
=>
{
const
noRelativeHttpHttpsOr
Steem
=
const
noRelativeHttpHttpsOr
Hive
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="land.com"> zippy </a> </xml>
'
;
const
cleansedRelativeHttpHttpsOr
Steem
=
const
cleansedRelativeHttpHttpsOr
Hive
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="https://land.com"> zippy </a> </xml>
'
;
const
resNoRelativeHttpHttpsOr
Steem
=
new
HtmlDOMParser
(
htmlParserOptions
)
.
parse
(
noRelativeHttpHttpsOr
Steem
)
const
resNoRelativeHttpHttpsOr
Hive
=
new
HtmlDOMParser
(
htmlParserOptions
)
.
parse
(
noRelativeHttpHttpsOr
Hive
)
.
getParsedDocumentAsString
();
expect
(
resNoRelativeHttpHttpsOr
Steem
).
to
.
equal
(
cleansedRelativeHttpHttpsOr
Steem
);
expect
(
resNoRelativeHttpHttpsOr
Hive
).
to
.
equal
(
cleansedRelativeHttpHttpsOr
Hive
);
});
it
(
"
should allow the
steem
uri scheme for vessel links
"
,
()
=>
{
const
noRelativeHttpHttpsOr
Steem
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="
steem
://veins.com"> arteries </a> </xml>
'
;
const
cleansedRelativeHttpHttpsOr
Steem
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="
steem
://veins.com"> arteries </a> </xml>
'
;
const
resNoRelativeHttpHttpsOr
Steem
=
new
HtmlDOMParser
(
htmlParserOptions
)
.
parse
(
noRelativeHttpHttpsOr
Steem
)
it
(
"
should allow the
hive
uri scheme for vessel links
"
,
()
=>
{
const
noRelativeHttpHttpsOr
Hive
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="
hive
://veins.com"> arteries </a> </xml>
'
;
const
cleansedRelativeHttpHttpsOr
Hive
=
'
<xml xmlns="http://www.w3.org/1999/xhtml"><a href="
hive
://veins.com"> arteries </a> </xml>
'
;
const
resNoRelativeHttpHttpsOr
Hive
=
new
HtmlDOMParser
(
htmlParserOptions
)
.
parse
(
noRelativeHttpHttpsOr
Hive
)
.
getParsedDocumentAsString
();
expect
(
resNoRelativeHttpHttpsOr
Steem
).
to
.
equal
(
cleansedRelativeHttpHttpsOr
Steem
);
expect
(
resNoRelativeHttpHttpsOr
Hive
).
to
.
equal
(
cleansedRelativeHttpHttpsOr
Hive
);
});
it
(
"
should not mistake usernames in valid comment urls as mentions
"
,
()
=>
{
Loading