Ticket #680: ticket680.patch

File ticket680.patch, 0.9 KB (added by FND, 4 years ago)

PrettyLinks? can use URL encoding (code courtesy of Jeremy)

  • trunk/core/js/Formatter.js

     
    304304                                // Pretty bracketted link 
    305305                                var link = lookaheadMatch[3]; 
    306306                                e = (!lookaheadMatch[2] && config.formatterHelpers.isExternalLink(link)) ? 
    307                                                 createExternalLink(w.output,link) : createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler); 
     307                                                createExternalLink(w.output,link) : createTiddlyLink(w.output,decodeURIComponent(link),false,null,w.isStatic,w.tiddler); 
    308308                        } else { 
    309309                                // Simple bracketted link 
    310                                 e = createTiddlyLink(w.output,text,false,null,w.isStatic,w.tiddler); 
     310                                e = createTiddlyLink(w.output,decodeURIComponent(text),false,null,w.isStatic,w.tiddler); 
    311311                        } 
    312312                        createTiddlyText(e,text); 
    313313                        w.nextMatch = this.lookaheadRegExp.lastIndex;