Diffstat (limited to 'frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js index 2295d3f..369b9ce 100644 --- a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js +++ b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js @@ -93,97 +93,97 @@ Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, { }, //------------------------------------------------------------------------- 'configuration': function() { return this._configuration; }, //------------------------------------------------------------------------- 'recordTitle': function() { if (this._recordTitle == null) { this._recordTitle = this.configuration().page.title; } return this._recordTitle; }, //------------------------------------------------------------------------- 'fields': function() { return this.configuration().form.inputs; }, //------------------------------------------------------------------------- 'editableFields': function() { if (this._editableFields == null) { this._editableFields = MochiKit.Base.filter(function(aField) { var result; var type; type = aField['type'].toLowerCase(); result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); return result; }, this.fields()) } return this._editableFields; }, //------------------------------------------------------------------------- 'hostname': function() { if (this._hostname == null) { var actionUrl; - actionUrl = this.configuration()['form']['attributes']['action']; + actionUrl = Clipperz.Base.sanitizeUrl(this.configuration()['form']['attributes']['action']); //MochiKit.Logging.logDebug("+++ actionUrl: " + actionUrl); this._hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); } return this._hostname; }, 'favicon': function() { if (this._favicon == null) { this._favicon = "http://" + this.hostname() + "/favicon.ico"; //MochiKit.Logging.logDebug("+++ favicon: " + this._favicon); } return this._favicon; }, //------------------------------------------------------------------------- 'record': function() { if (this._record == null) { var record; var recordVersion; var directLogin; var bindings; var i,c; record = new Clipperz.PM.DataModel.Record({ label:this.recordTitle(), notes:"", user:this.user() }); recordVersion = new Clipperz.PM.DataModel.RecordVersion(record, {}) record.setCurrentVersion(recordVersion); bindings = {}; c = this.editableFields().length; for (i=0; i<c; i++) { var formField; var recordField; //MochiKit.Logging.logDebug(">>> adding a field"); formField = this.editableFields()[i]; recordField = new Clipperz.PM.DataModel.RecordField({ recordVersion:recordVersion, label:formField['name'], value:formField['value'], type:Clipperz.PM.Strings.inputTypeToRecordFieldType[formField['type']], |