Skip to content

Commit

Permalink
Merge pull request #60 from seedstack/fix-trim
Browse files Browse the repository at this point in the history
Remove usage of trimLeft and trimRight
  • Loading branch information
adrienlauer committed Feb 15, 2016
2 parents 5754979 + 0669dbb commit 71dc30e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 2.2.2 (2016-02-15)

* [fix] Remove usage of non-standard `trimLeft` and `trimRight` functions in `w20.js`

# Version 2.2.1 (2016-02-08)

* [fix] Prevent redirection after login from applying if browsing session is already active (like after a full page refresh).
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "w20",
"version": "2.2.1",
"version": "2.2.2",
"ignore": [
".*",
"*.iml",
Expand Down
4 changes: 2 additions & 2 deletions modules/w20.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ define(['module'], function (module) {
if (v === 0) {
c.split(/[,;]/).map(function (cookie) {
var parts = cookie.split(/=/, 2),
name = decodeURIComponent(parts[0].trimLeft());
cookies[name] = parts.length > 1 ? decodeURIComponent(parts[1].trimRight()) : null;
name = decodeURIComponent(parts[0].replace(/^\s+/, ""));
cookies[name] = parts.length > 1 ? decodeURIComponent(parts[1].replace(/\s+$/, "")) : null;
});
} else {
c.match(/(?:^|\s+)([!#$%&'*+\-.0-9A-Z^`a-z|~]+)=([!#$%&'*+\-.0-9A-Z^`a-z|~]*|"(?:[\x20-\x7E\x80\xFF]|\\[\x00-\x7F])*")(?=\s*[,;]|$)/g).map(function ($0, $1) {
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "w20",
"version": "2.2.1",
"version": "2.2.2",
"description": "SeedStack Web framework",
"license": "MPL 2.0",
"contributors": [
Expand All @@ -11,9 +11,6 @@
{
"name": "Kavi RAMYEAD",
"email": "[email protected]"
},
{
"name": "Laurent DIDIER"
}
],
"devDependencies": {
Expand Down

0 comments on commit 71dc30e

Please sign in to comment.