1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-04 23:39:57 +00:00
TiddlyWiki5/plugins/tiddlywiki/aws/modules/encodings.js
Mario Pietsch fca39c7f72
Remove function wrapper (#8625)
* remove function wrapper

* add back anonymous function to sjcl.tid
2024-10-01 13:16:39 +01:00

24 lines
574 B
JavaScript

/*\
title: $:/plugins/tiddlywiki/aws/encodings.js
type: application/javascript
module-type: filteroperator
Filter operator for applying encodeuricomponent() to each item, with the addition of converting single quotes to %27, as required by AWS
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Export our filter functions
*/
exports["aws-encodeuricomponent"] = function(source,operator,options) {
var results = [];
source(function(tiddler,title) {
results.push(encodeURIComponent(title).replace(/'/g,"%27"));
});
return results;
};