Merge branch 'URI-encode-name-hash' of https://github.com/nnormand/reveal.js into dev
This commit is contained in:
commit
4cb0d52c73
@ -3776,9 +3776,10 @@
|
|||||||
var element;
|
var element;
|
||||||
|
|
||||||
// Ensure the named link is a valid HTML ID attribute
|
// Ensure the named link is a valid HTML ID attribute
|
||||||
if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) {
|
try {
|
||||||
// Find the slide with the specified ID
|
element = document.getElementById( decodeURIComponent( name ) );
|
||||||
element = document.getElementById( name );
|
}
|
||||||
|
catch (e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if( element ) {
|
if( element ) {
|
||||||
@ -3834,7 +3835,7 @@
|
|||||||
// Attempt to create a named link based on the slide's ID
|
// Attempt to create a named link based on the slide's ID
|
||||||
var id = currentSlide.getAttribute( 'id' );
|
var id = currentSlide.getAttribute( 'id' );
|
||||||
if( id ) {
|
if( id ) {
|
||||||
id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' );
|
id = encodeURIComponent( id );
|
||||||
}
|
}
|
||||||
|
|
||||||
var indexf;
|
var indexf;
|
||||||
|
Loading…
Reference in New Issue
Block a user