Thank you very much!! On Thursday, May 21, 2015 at 3:08:31 PM UTC-4, Eric Shulman wrote: > > On Thursday, May 21, 2015 at 11:37:57 AM UTC-7, Shango wrote: >> >> OK I think I figured it out and I can see the code for replacing the >> backslahes -- path.replace(/\\/g,'/'); >> But it is only doing it for when its assigning the URL parameter. I had >> to add these two lines: >> var relpath=relpath.replace(/\\/g,'/'); >> // added line >> var path=path.replace(/\\/g,'/'); >> // added line >> >> Hopefully I didn't break anything but it seems to be working correctly >> now. >> > > After your follow-up message, I took another look through my code, > specifically looking at the "DropLink" handling, which uses "path" and > "relpath". > > Your fix is pretty much what I was going to recommend. However, changing > the slashes in the path variable *might* break dropping of file *content* > or creating of attachment tiddlers. That's why you see a lot of > "path.replace(/\\/g,'/')" usage in the code. It ensures that the fixup for > "path" doesn't break any other logic that relies on the unaltered value. > > I suggest that you leave the contents of the path and relpath variables > unchanged, but fixup the backslashes on *output* only, by changing this > line: > if (co.chkFileDropLink) txt+=fmt.format([name,url,path,relpath,size,when, > now,who]); > to > if (co.chkFileDropLink) txt+=fmt.format([name,url,path.replace(/\\/g,'/'), > relpath.replace(/\\/g,'/'),size,when,now,who]); > That should fix your problem without affecting anything else. > > enjoy, > -e > Eric Shulman > ELS Design Studios > TiddlyTools - "Small Tools for Big Ideas!" > InsideTiddlyWiki: The Missing Manuals > > YOUR DONATIONS ARE VERY IMPORTANT! > HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... > http://TiddlyTools.github.com/fundraising.html#MakeADonation > > Professional TiddlyWiki Consulting Services... > Analysis, Design, and Custom Solutions: > http://www.TiddlyTools.com/#Contact >
-- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/42b655d1-9ff8-4cef-8b67-3ffcce300a5f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

