Tested with Chrome, Firefox and Safari.
The following code will not trigger an alert.
target.innerHTML = "<script> alert('XSS Attack'); </script>";
The following code will trigger an alert.
target.innerHTML = "";
package search | |
import ( | |
"fmt" | |
"time" | |
) | |
// Search performs a search | |
func Search(term string) string { |
Tested with Chrome, Firefox and Safari.
The following code will not trigger an alert.
target.innerHTML = "<script> alert('XSS Attack'); </script>";
The following code will trigger an alert.
target.innerHTML = "";
fetchProfile(1, function(){ | |
console.log("Callback 1"); | |
}); | |
fetchProfile(2, function(){ | |
console.log("Callback 2"); | |
}); | |
fetchProfile(3, function(){ | |
console.log("Callback 3"); | |
}); | |
fetchProfile(4, function(){ |
console.log("A"); | |
var returnFromTwo = stepOne().then(stepTwo); | |
console.log("B"); | |
returnFromTwo.then(stepThree); | |
console.log("C"); |
class Person | |
def initialize(name, location) | |
@name, @location = name, location | |
end | |
def greet | |
"Hello my name is #{@name} and I'm from #{@location}" | |
end | |
end |
var React = require("react"); | |
var allItems = [] | |
allItems.push("Buy ingredients for Crock Pot"); | |
allItems.push("Pick up chair at IKEA"); | |
allItems.push("Go see mom"); | |
class TodoList extends React.Component { | |
constructor(props){ | |
super(props); |
wget -O angular.js https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js | |
gzip angular.js | |
ls -h angular.js.gz # 45KB |
# DOCKER-VERSION 1.2.0 | |
FROM centos:centos6 | |
# Enable EPEL for Node.js | |
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# Install Node.js and npm | |
RUN yum install -y npm | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/app.js /tmp/app.js | |
ADD https://raw.githubusercontent.com/caike/ExpressDocker/master/src/package.json /tmp/package.json |
# DOCKER-VERSION 1.2.0 | |
FROM centos:centos6 | |
# Enable EPEL for Node.js | |
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# Install Node.js and npm | |
RUN yum install -y npm | |
# Creates a new folder on the container | |
VOLUME /src |
# DOCKER-VERSION 1.2.0 | |
FROM centos:centos6 | |
# Enable EPEL for Node.js | |
RUN rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# Install Node.js and npm | |
RUN yum install -y npm | |
# Bundle app source |