Author Topic: Rules Tab  (Read 594 times)

Mahound

  • Sr. Member
  • ****
  • Posts: 394
  • THE ONLY time i get screwed is when i play poker!
    • View Profile
Rules Tab
« on: March 26, 2012, 05:11:20 PM »
On the rules tab, whats the difference between using text and HTML?
 At the moment the rules that i use are Typed in by me. where if i want to format it, I have to manually insert the breaks, put in marquee's font size's,  announcements  etc.
This can be time consuming especially when there are any updates to any information to do, or if i wanted to insert the information for another league.

 I was wondering if it would be better to put the information  in as HTML, Am i right in thinking that this means  i could update any info in word, save it as an HTML doc and then import it.
If it is it would mean that i could update any info without the need of going into the TD software.

Thanks in advance for any advice or suggestions

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5540
    • View Profile
Re: Rules Tab
« Reply #1 on: March 26, 2012, 05:23:50 PM »
If you specify HTML, the content is inserted as is, with no modification.  If you specify Text, the content is HTML encoded first.  HTML encoding encodes only a few characters:

less than (<) is encoded as &lt;
greater than (>) is encoded as &gt;
ampersand (&) is encoded as &amp;
double quotes (") are encoded as &quot;

This is important because those characters are used in HTML to specify HTML objects.  For example, assume you wanted to insert the following:

Corey finished < Mahound but > everyone else.

If you specified this as HTML, the < Mahound but > part could be interpreted as an HTML element, and thus it would appear on the screen as:

Corey finished  everyone else.

(because to IE, < Mahound but > is supposed to be an HTML element, but it isn't a known HTML element, so it's discarded).

If you specify it as Text, it would be encoded as:

Corey finished &lt; Mahound but &gt; everyone else.

... which would make it appear as:

Corey finished < Mahound but > everyone else.

Specifying it as Text allows you to freely write your content without having to worry about less-than, greater-than, ampersand, or quotes (although quotes aren't really a problem), but you don't have free control over the flow or layout of the content.  Specifying it as HTML allows much more freedom, in that you can insert HTML elements like <font> or <div>, but it means you'll have to encode for yourself those special characters when they are meant to be interpreted as text and NOT HTML elements.