File tree Expand file tree Collapse file tree 7 files changed +37
-24
lines changed
Expand file tree Collapse file tree 7 files changed +37
-24
lines changed Original file line number Diff line number Diff line change 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
513Fixed demo/index.html
Original file line number Diff line number Diff line change @@ -15,14 +15,15 @@ Shariff besteht aus zwei Teilen. Der erste Teil ist eine einfache JavaScript-Bib
1515## Erste Schritte
1616
17171 . 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
2728Die Zähler in den Buttons benötigen ein [ Backend] ( #backends ) auf ihrem Server.
2829
Original file line number Diff line number Diff line change @@ -15,14 +15,15 @@ Shariff consists of two parts: a simple JavaScript client library and an optiona
1515## Getting Started
1616
17171 . 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
2728To enable the counters in the buttons, see section [ Backends] ( #backends ) .
2829
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ To prepare a release you have to do the following tasks:
551 . Run ` git flow release start [version] ` .
662 . Bump versions in ` package.json ` .
773 . 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
1012After pushing the release tag to GitHub, Travis CI will create release downloads and push the release to [ npmjs.com] ( https://www.npmjs.com ) .
1113
Original file line number Diff line number Diff line change 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" : {
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ var url = require('url')
55// abbreviate at last blank before length and add "\u2026" (horizontal ellipsis)
66var 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
You can’t perform that action at this time.
0 commit comments