nolink tag not working in headers

nolink tag not working in headers

Kimerly Wilcox tomonidan -
Number of replies: 2

I have added HTML Pages to a Moodle 2.6 site that has a Glossary. Linking works very well. However, Glossary entries are being linked in headers, and I don't want them to do that.  The Glossary FAQs says:

"If you don't want particular text to be linked (in a Forum post, say) then:

  1. In Edit mode, locate and click the Toggle HTML Source button on the formatting toolbar (appears as '<>' symbol)

  2. Locate the piece of text you want to exempt from autolinking

  3. Before and after the text respectively, add <nolink> and </nolink>.

  4. Save and check."


I have done this, with weird results.


Here is the header - Lesson 3. Host Plant Resistance - on the page, as it looks with the Glossary terms "host plant" and "resistance" autolinked:

Here is the original code:

<h2><span style="color: #c00000;">Lesson 3. Host Plant Resistance <br /></span></h2>


This is the code with the nolink tags added:

<h2><span style="color: #c00000;">Lesson 3. <nolink>Host Plant</nolink> <nolink>Resistance</nolink></span></h2>


Here is what the header now looks like on the page:

The glossary terms have been booted out of the header, on to the next line, in black Paragraph font, and the space between "Plant" and "Resistance" is lost.

Here is what the code looks like now:

<h2><span style="color: #c00000;">Lesson 3.</span></h2><nolink>Host Plant</nolink> <nolink>Resistance</nolink><h2></h2>

Have I used the nolink tag incorrectly? Have others encountered this? Does it just not work in a header?

I'll really appreciate any help y'all can provide.


Best,


Kim Wilcox

O'rtacha reytinglar: -
In reply to Kimerly Wilcox

Re: nolink tag not working in headers

John Provasnik tomonidan -
Particularly helpful Moodlers rasmi Testers rasmi

So I'm finding that you need to have the 'no link; tags around the entire header not just the individual words:


<nolink>
<h2>Lesson 3. Host Plant Resistance</h2>
</nolink>


I'm not sure how your glossary auto-linking is set up, but this works for me and retains my Heading Style without breaking it as shown in your image above.