##// END OF EJS Templates
add utils.url_join_encode...
MinRK -
Show More
@@ -419,6 +419,19 b' IPython.utils = (function (IPython) {'
419 }
419 }
420 return url;
420 return url;
421 };
421 };
422
423
424 var encode_uri_components = function (uri) {
425 // encode just the components of a multi-segment uri,
426 // leaving '/' separators
427 return uri.split('/').map(encodeURIComponent).join('/');
428 }
429
430 var url_join_encode = function () {
431 // join a sequence of url components with '/',
432 // encoding each component with encodeURIComponent
433 return encode_uri_components(url_path_join.apply(null, arguments));
434 };
422
435
423
436
424 var splitext = function (filename) {
437 var splitext = function (filename) {
@@ -458,6 +471,8 b' IPython.utils = (function (IPython) {'
458 autoLinkUrls : autoLinkUrls,
471 autoLinkUrls : autoLinkUrls,
459 points_to_pixels : points_to_pixels,
472 points_to_pixels : points_to_pixels,
460 url_path_join : url_path_join,
473 url_path_join : url_path_join,
474 url_join_encode : url_join_encode,
475 encode_uri_components : encode_uri_components,
461 splitext : splitext,
476 splitext : splitext,
462 always_new : always_new,
477 always_new : always_new,
463 browser : browser
478 browser : browser
General Comments 0
You need to be logged in to leave comments. Login now