Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7f7643b7
Commit
7f7643b7
authored
Sep 26, 2017
by
Daniel Clemente Laboreo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Encode URLs in shared links
E.g. in "course-v1:edX+DemoX+Demo_Course" the "+" will become "%2B"
parent
9a07227e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
lms/templates/courseware/course_about_sidebar_header.html
+8
-2
No files found.
lms/templates/courseware/course_about_sidebar_header.html
View file @
7f7643b7
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%!
<
%!
import
urllib
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
conf
import
settings
from
django
.
conf
import
settings
...
@@ -24,7 +26,9 @@ from django.conf import settings
...
@@ -24,7 +26,9 @@ from django.conf import settings
account=
static.get_value('course_about_twitter_account',
settings
.
PLATFORM_TWITTER_ACCOUNT
),
account=
static.get_value('course_about_twitter_account',
settings
.
PLATFORM_TWITTER_ACCOUNT
),
url=
u"http://{domain}{path}".format(
url=
u"http://{domain}{path}".format(
domain=
site_domain,
domain=
site_domain,
path=
reverse('about_course',
args=
[course.id.to_deprecated_string()])
path=
urllib.quote_plus(
reverse
('
about_course
',
args=
[course.id.to_deprecated_string()])
)
)
)
).
replace
(
u
"
",
u
"+")
).
replace
(
u
"
",
u
"+")
tweet_action =
u"http://twitter.com/intent/tweet?text={tweet_text}".format(tweet_text=tweet_text)
tweet_action =
u"http://twitter.com/intent/tweet?text={tweet_text}".format(tweet_text=tweet_text)
...
@@ -39,7 +43,9 @@ from django.conf import settings
...
@@ -39,7 +43,9 @@ from django.conf import settings
platform=
platform_name,
platform=
platform_name,
url=
u"http://{domain}{path}".format(
url=
u"http://{domain}{path}".format(
domain=
site_domain,
domain=
site_domain,
path=
reverse('about_course',
args=
[course.id.to_deprecated_string()]),
path=
urllib.quote_plus(
reverse
('
about_course
',
args=
[course.id.to_deprecated_string()]),
)
)
)
)
)
).
replace
(
u
"
",
u
"%
20
")
).
replace
(
u
"
",
u
"%
20
")
...
...
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