Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CodiMD export script
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
stgroup
misc
CodiMD export script
Merge requests
!1
Hedgedoc import
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Hedgedoc import
hedgedoc-import
into
main
Overview
2
Commits
38
Pipelines
0
Changes
1
Merged
Andreas Domanowski
requested to merge
hedgedoc-import
into
main
2 years ago
Overview
2
Commits
38
Pipelines
0
Changes
1
0
0
Merge request reports
Viewing commit
9bb86577
Prev
Next
Show latest version
1 file
+
1
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
9bb86577
Replace string replacing with urllib quote replacer
· 9bb86577
Andreas Domanowski
authored
2 years ago
import_md/hedgedoc_import.py
+
1
−
1
View file @ 9bb86577
Edit in single-file editor
Open in Web IDE
Show full file
@@ -10,7 +10,7 @@ from zipfile import ZipFile
@@ -10,7 +10,7 @@ from zipfile import ZipFile
def
import_single_document
(
instance_url
,
hedgedoc_free_url
,
content
,
session_id
):
def
import_single_document
(
instance_url
,
hedgedoc_free_url
,
content
,
session_id
):
sanitized_free_url
=
hedgedoc_free_url
.
replace
(
"
"
,
"
%20
"
)
sanitized_free_url
=
urllib
.
parse
.
quote
(
hedgedoc_free_url
)
request_url
=
instance_url
+
'
/new/
'
+
sanitized_free_url
request_url
=
instance_url
+
'
/new/
'
+
sanitized_free_url
headers
=
{
"
Cookie
"
:
f
"
connect.hedgeDoc.sid=
{
session_id
}
"
,
"
Content-Type
"
:
"
text/markdown
"
}
headers
=
{
"
Cookie
"
:
f
"
connect.hedgeDoc.sid=
{
session_id
}
"
,
"
Content-Type
"
:
"
text/markdown
"
}
Loading