Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

Code being automatically replaced 8 years 2 weeks ago #4110

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
I'm writing some MHRA referencing guidelines in a Bootstrap template. In this referencing style web pages should be enclosed within a set of angled brackets, for example:

Christel Lane and others, The Future of Professionalised Work: UK and Germany Compared (London: Anglo-German Foundation for the Study of Industrial Society, 2003) <www.agf.org.uk/pubs/pdfs/1232web.pdf> [accessed 12 December 2007] (p. 11)


So, I figured that this could simply be written in the Bootstrap page as:
&lt;http://www.agf.org.uk/pubs/pdfs/1232web.pdf&gt;

However, if you leave the page, then return to look at the source, you'll find it is has been changed to show:
<http://www.agf.org.uk/pubs/pdfs/1232web.pdf>

If you leave and open the source again, it shows:
<http: 1232web.pdf="" pdfs="" pubs="" www.agf.org.uk="">
    </http:>

How can I stop it from changing lt and gt into < and >?

Please Inloggen or Create an account to join the conversation.

Last edit: by Neil Pollock.

Code being automatically replaced 8 years 2 weeks ago #4111

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
On a related note, in HTML5 you are able to wrap block-level elements with anchor tags. For example:

<a href="#">
<div class="section01">
<h1>Heading</h1>
<p>Some text.</p>
</div>
</a>

However, Xerte doesn't appear to like this and will automatically convert such code to:
<div class="section01">
<h1><a href="#">Heading</a></h1>
<p><a href="#">Some text.</a></p>
</div>

Please Inloggen or Create an account to join the conversation.

Code being automatically replaced 8 years 2 weeks ago #4114

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
Hi Neil

The anchor tag issue seems to be a known issue with ckeditor that Xerte uses. You can use this workaround where you surround the div with the link at runtime:
<div id="anchorDiv" class="section01">
<h1>Heading</h1>
<p>Some text.</p>
</div>
<script>
$('#anchorDiv').wrap('<a href="#"></a>');
</script>

The < > issue also seems to be a problem with ckeditor. You can either make the url a link:
<p>Christel Lane and others, The Future of Professionalised Work: UK and Germany Compared (London: Anglo-German Foundation for the Study of Industrial Society, 2003)&nbsp;&lt;<a href="http://www.agf.org.uk/pubs/pdfs/1232web.pdf" target="_blank">www.agf.org.uk/pubs/pdfs/1232web.pdf</a>&gt;&nbsp;[accessed 12 December 2007] (p. 11)
</p>

or if you'd prefer not to do this then surround the url with a span tag:
<p>Christel Lane and others, The Future of Professionalised Work: UK and Germany Compared (London: Anglo-German Foundation for the Study of Industrial Society, 2003)&nbsp;&lt;<span>www.agf.org.uk/pubs/pdfs/1232web.pdf</span>&gt;&nbsp;[accessed 12 December 2007] (p. 11)&nbsp;
</p>

It seems to not like the < being directly next to the url (simply adding a space also works but I guess this isn't ideal if you're showing how the reference should be written)
The following user(s) said Thank You: Neil Pollock

Please Inloggen or Create an account to join the conversation.

Code being automatically replaced 8 years 2 weeks ago #4116

  • Neil Pollock
  • Neil Pollock's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 92
  • Thank you received: 4
Thanks for this.

The <span> workaround seems to do the job for now (although, it still converts code to brackets if you use the "HTML Code" page type rather than the "Text" page type).

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.052 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search