diff --git a/app/components/client/playground-scripts.js b/app/components/client/playground-scripts.js index 7a17f9f..5de27e0 100644 --- a/app/components/client/playground-scripts.js +++ b/app/components/client/playground-scripts.js @@ -125,19 +125,13 @@ function debounce(func, wait, immediate) { }; } -function initializePlayground() { - document.querySelector(".playground").classList.add("waiting"); - document.querySelector("#fetch-claim-uri").value = ""; - document.querySelector("#fetch-claim-uri").focus(); - document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active"); - - send({ - message: "landed on playground" - }); - - setTimeout(() => { - document.querySelector(".playground-navigation__example:nth-child(1)").click(); - }, 300); +function escapeHTML(content) { + return content.replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(/\//g, "/"); } function fetchMetadata(exampleNumber, data) { @@ -153,6 +147,8 @@ function fetchMetadata(exampleNumber, data) { example: exampleNumber }); + data = escapeHTML(data); + document.getElementById("fetch-claim-uri").value = data; document.getElementById("playground-results").innerHTML = playgroundResponseForExample1(data); document.getElementById("playground-loader").style.display = "none"; @@ -178,6 +174,8 @@ function fetchMetadata(exampleNumber, data) { example: exampleNumber }); + data = escapeHTML(data); + document.getElementById("fetch-claim-uri").value = data; document.getElementById("playground-results").innerHTML = playgroundResponseForExample3(data); document.getElementById("playground-loader").style.display = "none"; @@ -200,6 +198,21 @@ function getMemeInfo() { // TODO: Error handling }; } +function initializePlayground() { + document.querySelector(".playground").classList.add("waiting"); + document.querySelector("#fetch-claim-uri").value = ""; + document.querySelector("#fetch-claim-uri").focus(); + document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active"); + + send({ + message: "landed on playground" + }); + + setTimeout(() => { + document.querySelector(".playground-navigation__example:nth-child(1)").click(); + }, 300); +} + function playgroundResponseForExample1(source) { return `
# With the LBRY app/daemon running locally, you can use this in your Terminal
diff --git a/documents/developer-program.md b/documents/developer-program.md
index 758519a..3972c1d 100644
--- a/documents/developer-program.md
+++ b/documents/developer-program.md
@@ -6,7 +6,7 @@ LBRY offers a complimentary 100 LBC to qualified engineers to facilitate explora
To qualify you must:
-- Have a GitHub account prior to January 1st, 2018.
-- Have made a public pull request within the past year.
+- have a GitHub account that is at least 90 days old and
+- have an active commit history
This program will be active on 2019.02.21. Stay tuned!