Skip to content

Commit

Permalink
Fixed new line handling for JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Real-Gecko committed Feb 15, 2018
1 parent e49d3d3 commit 30340f7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Change Log
## [2.2.1] - 2018-02-15
### Fixed
- By [**Denis Kanchev**](https://github.com/Demayl)
- Fix: simplify_path sub not used correct
- fix: typo in quote regex in list.cgi for allowed_paths
- fix: typo on pop in paste.cgi and symlink.cgi - so they work again
- imp: use 3 arg open
- fix: skip empty name of files - they are not needed because the path is separate from their name and empty name means nothing.
- Small typo fix by [**eldk**](https://github.com/eldk)
- Fixed new line handling for JSON, thus making module work in Usermin

## [2.2.0] - 2018-01-31
### Fixed
- Fixed [#126](https://github.com/Real-Gecko/Filemin/issues/126)
Expand Down
2 changes: 1 addition & 1 deletion filemin-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ sub get_paths {
if (scalar(@errors) > 0) {
$result = '';
foreach $error(@errors) {
$result.= "$error<br>";
$result.= "$error\\n";
}
print_ajax_header();
print '{"error": "'.$result.'"}';
Expand Down
2 changes: 1 addition & 1 deletion list.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ foreach(@list) {
if (scalar(@errors) > 0) {
$result = '';
foreach $error(@errors) {
$result.= "$error<br>";
$result.= "$error\\n";
}
print '{"error": "'.$result.'"}';
} else {
Expand Down
2 changes: 1 addition & 1 deletion module.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ desc=Filemin File Manager
os_support=*-linux freebsd
name=Filemin
longdesc=Fast and light file manager written in perl
version=2.2.0
version=2.2.1
webmin=1
usermin=1
flavour=full
Expand Down
1 change: 1 addition & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
rm upload/*
cp unauthenticated/js/filemin.js unauthenticated/js/filemin.min.js
cp unauthenticated/js/spec-ops.js unauthenticated/js/spec-ops.min.js
Expand Down
2 changes: 1 addition & 1 deletion paste.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(open(my $fh, "<", &get_paste_buffer_file())) {
if (scalar(@errors) > 0) {
$result = '';
foreach $error(@errors) {
$result.= "$error<br>";
$result.= "$error\\n";
}
print Mojo::JSON::to_json({'error' => $result});
} else {
Expand Down

0 comments on commit 30340f7

Please sign in to comment.