Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
relate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Andreas Klöckner
relate
Commits
eb49c80e
Commit
eb49c80e
authored
10 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Fix YAML+Jinja Unicode handling
parent
af7e65b2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
course/content.py
+4
-0
4 additions, 0 deletions
course/content.py
with
4 additions
and
0 deletions
course/content.py
+
4
−
0
View file @
eb49c80e
...
...
@@ -28,6 +28,7 @@ from django.conf import settings
import
re
import
datetime
import
six
from
django.utils.timezone
import
now
from
django.core.exceptions
import
ObjectDoesNotExist
,
ImproperlyConfigured
...
...
@@ -119,6 +120,9 @@ JINJA_YAML_RE = re.compile(
def
expand_yaml_macros
(
repo
,
commit_sha
,
yaml_str
):
if
isinstance
(
yaml_str
,
six
.
binary_type
):
yaml_str
=
yaml_str
.
decode
(
"
utf-8
"
)
def
compute_replacement
(
match
):
jinja_src
=
match
.
group
(
1
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment