IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit a60b0225 authored by Amy Rose's avatar Amy Rose
Browse files

prevent templates from causing invalid requests

parent c2b5608c
Pipeline #755 passed with stage
in 3 minutes and 24 seconds
......@@ -24,11 +24,11 @@ Displays an error message if the user has JavaScript disabled.
{% endcomment %}
<div id="project-template" class="project">
<div class="project-image">
<img src="IMAGE_LINK" />
<img src="#IMAGE_LINK" />
</div>
<div class="project-title">TITLE</div>
<div class="project-title">#TITLE</div>
<!--<div class="project-owner">OWNER</div>-->
<div class="project-desc">DESCRIPTION</div>
<div class="project-desc">#DESCRIPTION</div>
<div class="project-links">
{% comment %}
Another template, this time for how to format the
......@@ -36,8 +36,8 @@ Displays an error message if the user has JavaScript disabled.
{% endcomment %}
<a
id="project-link-template"
href="PROJECT_LINK">
LINK_TEXT
href="#PROJECT_LINK">
#LINK_TEXT
</a>
</div>
</div>
......
......@@ -8,15 +8,15 @@ const PROJECTS_CONTAINER_ID = "projects-container";
/* Mappers between JSON keys and template text to replace */
const PROJECT_TEMPLATE_ID = "project-template";
const PROJECT_TEMPLATE_MAP = {
"name": "TITLE",
"desc": "DESCRIPTION",
"image": "IMAGE_LINK",
"name": "#TITLE",
"desc": "#DESCRIPTION",
"image": "#IMAGE_LINK",
};
const LINK_DATA_KEY = "links";
const LINK_TEMPLATE_ID = "project-link-template";
const LINK_TEMPLATE_MAP = {
"site": "LINK_TEXT",
"link": "PROJECT_LINK",
"site": "#LINK_TEXT",
"link": "#PROJECT_LINK",
};
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment