This commit is contained in:
fen 2013-11-05 21:56:08 +08:00
commit b4ac909e1e

View File

@ -4858,10 +4858,20 @@ else
if (!chunk.selection) {
if (isImage) {
chunk.selection = that.getString("imagename").replace('_', '\\_') || that.getString("imagedescription");
var imagename = that.getString("imagename");
if (!!imagename) {
imagename = imagename.replace('_', '\\_');
}
chunk.selection = imagename || that.getString("imagedescription");
}
else {
chunk.selection = that.getString("linkname").replace('_', '\\_') || that.getString("linkdescription");
var linkname = that.getString("linkname");
if (!!linkname) {
linkname = linkname.replace('_', '\\_');
}
chunk.selection = linkname.replace('_', '\\_') || that.getString("linkdescription");
}
}
}