Public bug reported:

To replicate
=========

1) Create a multiline verbatim code block with
    '''
    code hre
    ''''
2) Reload page to format correctly. 
3) Select the "e" in code, and copy to clipboard.
4) Move cursor between "h" and "r" and paste.

Expected results
==============
Source should look like this:
    '''
    code here
    ''''

Observed results
==============
Source looks like this:
    '''
    code h
    '''
    ''ere''

If you reload the page, you can see this results in a newline before the
pasted "e", and the following code is also changed to "in-line"
verbatim.

This is particularly problematic if you forget this bug exists, and
forget to reload. If you attempt to copy edited code and paste into a
terminal, you can potentially execute the wrong code, as the invisible
newline is inserted in the clipboard.

For example… (DON'T DO THIS)
'''
sudo rm -rf /local/bin/usr/myscripts
'''

Oh, I got the path wrong! I'll just copy "usr/" and paste it before
"local". Then, I'll copy the whole command and paste it into a terminal!

Obviously, here, `sudo rm -rf /` will be executed immediately, as the
newline is parsed.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: zim 0.60-1
Uname: Linux 3.11.8-031108-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Mon Mar 31 16:25:53 2014
InstallationDate: Installed on 2012-12-16 (469 days ago)
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: zim
UpgradeStatus: Upgraded to saucy on 2013-10-18 (164 days ago)

** Affects: zim (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug saucy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1300016

Title:
  Copy-pasting within a verbatim code block introduces newlines

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zim/+bug/1300016/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to