editor creates mal-formed .js files

Bug #1915770 reported by jrv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

start ebook-edit
file, create new empty book
epub
give name and save in convenient directory
file, newfile, functions.js, ok

expected: empty file functions.js opens
actual: file opens with text
  b''

replace text with
  function aFunction() {
    console.log( 'in aFunction' );
  }
save
close ebook-edit
open just-created .epub using ebook-edit
if not open at start, open functions.js in the editor pane by double clicking on file browser panel

expected: editor to open with contents
  function aFunction() {
    console.log( 'in aFunction' );
  }
actual: editor opens with contents
  b"function aFunction() {\n console.log( 'in aFunction' );\n}"

It looks to me as though python string literals are put in the editor rather than the eval of those python string literals

calibre version: 5.10.1
OS: linux bullseye/testing

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.