Test: Markup

This page is for testing the web site's handling of markup text. The following things should be noted:

  • The supported markup languages are:
    • XHTML 1.0.
    • HTML 5.
  • At present, the "transitional" DTD is used for XHTML, though there are plans to tighten up to the "strict" version.
  • CSS version 2 is mostly used, with only partial support for version 3.

Tests

The following sections are the tests, which should be self-explanatory.

Entities
Ampersands
Test Name Markup Expected Actual Result
1 Lone
&
&
&
Pass
2 Double
&&
&&
&&
Pass
3 Missing semicolon
&amp
&amp
&amp
Pass
4 Missing hash
&123;
&123;
&123;
Pass
5 Capital X
 
 
 
Pass
6 Missing entity
&;
&;
&;
Pass
Comments

Not all markup is displayed, some is treated as comments. This is achieved by <!-- placing it between these delimiters -->.

Test Name Markup Expected Actual Result
1 No markup
<!-- Comments must not contain any <em>markup</em>, only <strong>plain text</strong>. -->
<!-- Comments must not contain any {em}markup{/em}, only {strong}plain text{/strong}. -->
<!-- Comments must not contain any {em}markup{/em}, only {strong}plain text{/strong}. -->
Pass
2 No double-dash
<!-- They must also not contain any double-dash (--) sequences. -->
<!-- They must also not contain any double-dash (-) sequences. -->
<!-- They must also not contain any double-dash (-) sequences. -->
Pass
3 Nesting
<!-- In this case, there is an <!--"inner"--> comment. -->
<!-- In this case, there is an {!"inner"/} comment. -->
<!-- In this case, there is an {!"inner"/} comment. -->
Pass
4 Unbalanced open
<!-- Over zealous closure --> --> --> -->
<!-- Over zealous closure -->   
<!-- Over zealous closure -->   
Pass
5 Unbalanced closed
<!-- this comment [ <!-- with nesting ] did not end
<!-- this comment [ {! with nesting ] did not end-->
<!-- this comment [ {! with nesting ] did not end-->
Pass
Scripts

Some script text may confuse the comment handling filters.

Test Name Markup Expected Actual Result
1 Script
<script type="text/javascript">
/* <![CDATA[ */
var __wpcf7 = {"loaderUrl":"/ajax-loader.gif","sending":"Sending ..."};
/* ]]> */
</script>
<script type="text/javascript">
var i = 3;
if ((i < 1) || (i > 7))
{
	alert ("out of range");
}
</script>
<script type="text/javascript">
/* <![CDATA[ */
var __wpcf7 = {"loaderUrl":"/ajax-loader.gif","sending":"Sending ..."};
/* ]]> */
</script>
<script type="text/javascript">
var i = 3;
if ((i < 1) || (i > 7))
{
	alert ("out of range");
}
</script>
<script type="text/javascript">
/* <![CDATA[ */
var __wpcf7 = {"loaderUrl":"/ajax-loader.gif","sending":"Sending ..."};
/* ]]> */
</script>
<script type="text/javascript">
var i = 3;
if ((i < 1) || (i > 7))
{
	alert ("out of range");
}
</script>
Pass

More to be developed…

Article Actions
Article Information
Author: Kevin Machin Date: October 3, 2014 10:35 am
Categories: Website Tags: test
Responses: 0 – open Article: 3213 – published
Submit a New Comment
Alternatively, you can use your account, if you have one – Log in
Cancel

article as:

Pages
Archives
Logo: Get Creative
Image: hissac.logo-t.png

Competition & Mentorships

We are proud to be associated with the Highlands & Islands Short Story Association.