Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor changes #5

Merged
merged 2 commits into from
Oct 13, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix escaping of < and >
Occuring when displaying in html
  • Loading branch information
JonasWissing committed Oct 13, 2017
commit 174f9230cf0c343f029407cb33dbec9b3012d3bb
16 changes: 8 additions & 8 deletions public/configure/js/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ Table.prototype.Queries = function () {
if(json[index].ds_port != null && json[index].ds_port != "") {
_dsUrl += ":" + json[index].ds_port+"/";
}
if(json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;").length > 13) {
if(json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;").length > 13) {
that.data.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;").substring(0,10) + '...',
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;").substring(0,10) + '...',
json[index].query_description,
json[index].category_name,
_url,
Expand All @@ -130,7 +130,7 @@ Table.prototype.Queries = function () {
that.data.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;"),
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;"),
json[index].query_description,
json[index].category_name,
_url,
Expand All @@ -141,7 +141,7 @@ Table.prototype.Queries = function () {
that.data_all.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;"),
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;"),
json[index].query_description,
json[index].category_name,
_url,
Expand Down Expand Up @@ -192,11 +192,11 @@ Table.prototype.QueriesByUser = function (username, form) {
if(json[index].ds_port != null && json[index].ds_port != "") {
_dsUrl += ":" + json[index].ds_port+"/";
}
if(json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;").length > 13) {
if(json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;").length > 13) {
that.data.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;").substring(0,10) + '...',
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;").substring(0,10) + '...',
json[index].query_description,
json[index].category_name,
_url,
Expand All @@ -207,7 +207,7 @@ Table.prototype.QueriesByUser = function (username, form) {
that.data.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;"),
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;"),
json[index].query_description,
json[index].category_name,
_url,
Expand All @@ -218,7 +218,7 @@ Table.prototype.QueriesByUser = function (username, form) {
that.data_all.push([
json[index].query_id,
json[index].query_extern,
json[index].query_intern.replace("<", "&lt;").replace(">", "&gt;"),
json[index].query_intern.replace(/\</g, "&lt;").replace(/\>/g, "&gt;"),
json[index].query_description,
json[index].category_name,
_url,
Expand Down