Browse Source

HTML5 n'accepte plus (abandonné des drafts) la valeur "footnote" des REV et REL dans les liens. La valeur appendix (autorisée) semble plus indiquée. Sinon, on le retire complètement.

svn/root/tags/plugins/textwheel/1.3.17
xdjuj@apsulis.com 5 years ago
parent
commit
ba9f0667d2
  1. 4
      inc/notes.php
  2. 16
      tests/data/base/notes.html
  3. 16
      tests/data/modeles_block/notes.html
  4. 16
      tests/data/modeles_inline/notes.html
  5. 16
      tests/data/typo/notes.html

4
inc/notes.php

@ -195,7 +195,7 @@ function traiter_raccourci_notes($letexte, $marqueur_notes) {
// dans le texte, mettre l'appel de note a la place de la note
if ($nom) {
$nom = _NOTES_OUVRE_REF . "<a href='#nb$ancre' class='spip_note' rel='footnote'$title$att>$nom</a>" . _NOTES_FERME_REF;
$nom = _NOTES_OUVRE_REF . "<a href='#nb$ancre' class='spip_note' rel='appendix'$title$att>$nom</a>" . _NOTES_FERME_REF;
}
$pos = strpos($letexte, $note_source);
@ -216,7 +216,7 @@ function traiter_les_notes($notes, $ignorer_autobr) {
$title = _T('info_notes');
foreach ($notes as $r) {
list($ancre, $nom, $texte) = $r;
$atts = " href='#nh$ancre' class='spip_note' title='$title $ancre' rev='footnote'";
$atts = " href='#nh$ancre' class='spip_note' title='$title $ancre' rev='appendix'";
$mes_notes .= "\n\n"
. "<div id='nb$ancre'><p" . ($GLOBALS['class_spip'] ? " class='spip_note'" : "") . ">"
. code_echappement($nom

16
tests/data/base/notes.html

@ -1,12 +1,12 @@
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='footnote' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='footnote' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='footnote' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='footnote' title='with a footnote with manual link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='footnote'>1</a>]&nbsp;</span>with a footnote</p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='appendix' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='appendix' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='appendix' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='appendix' title='with a footnote with manual link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='appendix'>1</a>]&nbsp;</span>with a footnote</p>
</div><div id='nba'>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='footnote'>a</a>]&nbsp;</span>with a named footnote</p>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='appendix'>a</a>]&nbsp;</span>with a named footnote</p>
</div><div id='nb2'>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='footnote'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a></p>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='appendix'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a></p>
</div><div id='nb3'>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='footnote'>3</a>]&nbsp;</span>with a footnote with manual link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a></p>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='appendix'>3</a>]&nbsp;</span>with a footnote with manual link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a></p>
</div></div>

16
tests/data/modeles_block/notes.html

@ -1,12 +1,12 @@
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='footnote' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='footnote' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='footnote' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='footnote' title='with a footnote with link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='footnote'>1</a>]&nbsp;</span>with a footnote</p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='appendix' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='appendix' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='appendix' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='appendix' title='with a footnote with link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='appendix'>1</a>]&nbsp;</span>with a footnote</p>
<div>Block test model #1</div></div><div id='nba'>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='footnote'>a</a>]&nbsp;</span>with a named footnote</p>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='appendix'>a</a>]&nbsp;</span>with a named footnote</p>
<div>Block test model #1</div></div><div id='nb2'>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='footnote'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a></p>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='appendix'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a></p>
<div>Block test model #1</div></div><div id='nb3'>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='footnote'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a></p>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='appendix'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a></p>
<div>Block test model #1</div></div></div>

16
tests/data/modeles_inline/notes.html

@ -1,12 +1,12 @@
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='footnote' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='footnote' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='footnote' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='footnote' title='with a footnote with link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='footnote'>1</a>]&nbsp;</span>with a footnote <span>Inline test model #1</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='appendix' title='with a footnote' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='appendix' title='with a named footnote' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='appendix' title='with a footnote with autolink' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='appendix' title='with a footnote with link http://example.com' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Footnotes 1' rev='appendix'>1</a>]&nbsp;</span>with a footnote <span>Inline test model #1</span></p>
</div><div id='nba'>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='footnote'>a</a>]&nbsp;</span>with a named footnote <span>Inline test model #1</span></p>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Footnotes a' rev='appendix'>a</a>]&nbsp;</span>with a named footnote <span>Inline test model #1</span></p>
</div><div id='nb2'>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='footnote'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a> <span>Inline test model #1</span></p>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Footnotes 2' rev='appendix'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a> <span>Inline test model #1</span></p>
</div><div id='nb3'>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='footnote'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a> <span>Inline test model #1</span></p>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Footnotes 3' rev='appendix'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a> <span>Inline test model #1</span></p>
</div></div>

16
tests/data/typo/notes.html

@ -1,12 +1,12 @@
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='footnote' title='with a footnote avec de la typo !' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='footnote' title='with a named footnote avec de la typo !' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='footnote' title='with a footnote with autolink avec de la typo !' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='footnote' title='with a footnote with link http://example.com avec typo !' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Notes 1' rev='footnote'>1</a>]&nbsp;</span>with a footnote avec de la typo&nbsp;!</p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='appendix' title='with a footnote avec de la typo !' id='nh1'>1</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nba' class='spip_note' rel='appendix' title='with a named footnote avec de la typo !' id='nha'>a</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb2' class='spip_note' rel='appendix' title='with a footnote with autolink avec de la typo !' id='nh2'>2</a>]</span></p>
<p>This is a text<span class="spip_note_ref">&nbsp;[<a href='#nb3' class='spip_note' rel='appendix' title='with a footnote with link http://example.com avec typo !' id='nh3'>3</a>]</span></p><div class='notes'><div id='nb1'>
<p><span class="spip_note_ref">[<a href='#nh1' class='spip_note' title='Notes 1' rev='appendix'>1</a>]&nbsp;</span>with a footnote avec de la typo&nbsp;!</p>
</div><div id='nba'>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Notes a' rev='footnote'>a</a>]&nbsp;</span>with a named footnote avec de la typo&nbsp;!</p>
<p><span class="spip_note_ref">[<a href='#nha' class='spip_note' title='Notes a' rev='appendix'>a</a>]&nbsp;</span>with a named footnote avec de la typo&nbsp;!</p>
</div><div id='nb2'>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Notes 2' rev='footnote'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a> avec de la typo&nbsp;!</p>
<p><span class="spip_note_ref">[<a href='#nh2' class='spip_note' title='Notes 2' rev='appendix'>2</a>]&nbsp;</span>with a footnote with autolink <a href="http://example.com" class='spip_url spip_out auto' rel='nofollow external'>http://example.com</a> avec de la typo&nbsp;!</p>
</div><div id='nb3'>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Notes 3' rev='footnote'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a> avec typo&nbsp;!</p>
<p><span class="spip_note_ref">[<a href='#nh3' class='spip_note' title='Notes 3' rev='appendix'>3</a>]&nbsp;</span>with a footnote with link <a href="http://example.com" class='spip_url spip_out' rel='external'>http://example.com</a> avec typo&nbsp;!</p>
</div></div>
Loading…
Cancel
Save