Skip to content

Commit a19f750

Browse files
committed
Merge branch 'release/2.0.2'
2 parents 10d46f5 + a0c4fb7 commit a19f750

File tree

7 files changed

+37
-24
lines changed

7 files changed

+37
-24
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v2.0.2, 2018-04-17
4+
5+
Fetched from [heiseonline/shariff](https://github.com/heiseonline/shariff):
6+
7+
- Fix installation instructions.
8+
- Fixed XSS vulnerability discovered by JoJoAction in twitter service ([heiseonline#319](https://github.com/heiseonline/shariff/pull/319)).
9+
- Update package-lock.json to match dependencies.
10+
311
## v2.0.1, 2018-03-15
412

513
Fixed demo/index.html

README-de.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ Shariff besteht aus zwei Teilen. Der erste Teil ist eine einfache JavaScript-Bib
1515
## Erste Schritte
1616

1717
1. Das [aktuellste Shariff-Plus-Release](https://github.com/richard67/shariff-plus/releases/latest) herunterladen
18-
2. CSS im `<head>` einbinden:
19-
* `shariff.complete.css` enthält alle Abhängigkeiten
18+
2. Alle im Release enthaltenen Dateien hochladen
19+
3. CSS im `<head>` einbinden:
20+
* `shariff.complete.css` verlässt sich auf die im Release enthaltenen Abhängigkeiten
2021
* `shariff.min.css` verwenden, wenn [Font Awesome](https://github.com/FortAwesome/Font-Awesome) bereits in Ihrer Seite geladen wird
21-
3. JavaScript unmittelbar vor `</body>` einbinden:
22-
* `shariff.complete.js` enthält alle Abhängigkeiten
22+
4. JavaScript unmittelbar vor `</body>` einbinden:
23+
* `shariff.complete.js` verlässt sich auf die im Release enthaltenen Abhängigkeiten
2324
* `shariff.min.js` verwenden, wenn [jQuery](https://github.com/jquery/jquery) bereits in der Seite vorhanden ist
24-
4. Beliebig viele `<div class="shariff">` Elemente einfügen
25-
5. Mit den unten beschriebenen `data`-Attributen Aussehen und Funktion konfigurieren
25+
5. Beliebig viele `<div class="shariff">` Elemente einfügen
26+
6. Mit den unten beschriebenen `data`-Attributen Aussehen und Funktion konfigurieren
2627

2728
Die Zähler in den Buttons benötigen ein [Backend](#backends) auf ihrem Server.
2829

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ Shariff consists of two parts: a simple JavaScript client library and an optiona
1515
## Getting Started
1616

1717
1. Download the [latest release](https://github.com/richard67/shariff-plus/releases/latest)
18-
2. Include CSS in `<head>`:
19-
* `shariff.complete.css` contains all dependencies
20-
* if [Font Awesome](https://github.com/FortAwesome/Font-Awesome) is already included in your site, use `shariff.min.css`
21-
3. Include JavaScript right before `</body>`:
22-
* `shariff.complete.js` contains all dependencies
23-
* if [jQuery](https://github.com/jquery/jquery) is already included in your site, use `shariff.min.js`
24-
4. Insert one or more `<div class="shariff">` elements.
25-
5. Customize the look using data-* attributes.
18+
2. Upload all files included in the release
19+
3. Include CSS in `<head>`:
20+
* `shariff.complete.css` uses the dependencies included in the release files
21+
* if [Font Awesome](https://github.com/FortAwesome/Font-Awesome) is already included in your site, use `build/shariff.min.css`
22+
4. Include JavaScript right before `</body>`:
23+
* `shariff.complete.js` uses the dependencies included in the release files
24+
* if [jQuery](https://github.com/jquery/jquery) is already included in your site, use `build/shariff.min.js`
25+
5. Insert one or more `<div class="shariff">` elements.
26+
6. Customize the look using data-* attributes.
2627

2728
To enable the counters in the buttons, see section [Backends](#backends).
2829

RELEASING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ To prepare a release you have to do the following tasks:
55
1. Run `git flow release start [version]`.
66
2. Bump versions in `package.json`.
77
3. Update [CHANGELOG.md](CHANGELOG.md).
8-
2. Run `git flow release finish`.
8+
4. Run `npm install` to update `package-lock.json`.
9+
5. Commit changes.
10+
6. Run `git flow release finish`.
911

1012
After pushing the release tag to GitHub, Travis CI will create release downloads and push the release to [npmjs.com](https://www.npmjs.com).
1113

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shariff-plus",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Shariff-Plus enables website users to share or like their favorite content without compromising their privacy. It is based on Shariff by Heise Medien GmbH & Co. KG.",
55
"main": "src/js/shariff.js",
66
"scripts": {

src/js/services/twitter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ var url = require('url')
55
// abbreviate at last blank before length and add "\u2026" (horizontal ellipsis)
66
var abbreviateText = function(text, length) {
77
var div = document.createElement('div')
8-
div.innerHTML = text
8+
var node = document.createTextNode(text)
9+
div.appendChild(node)
910
var abbreviated = div.textContent
1011
if (abbreviated.length <= length) {
1112
return text

0 commit comments

Comments
 (0)