New line element (<br>) in Rapid PHP 2011

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
geertemo
Posts: 10
Joined: Tue Mar 20, 2012 4:27 pm

New line element (<br>) in Rapid PHP 2011

Post by geertemo »

When typing a new line element (<br>) when I press the shift + greater-than key instead of the character ">" I am asking for the program enters " />" into the code.
As far as I can see this can not be changed via the keyboard shortcut keys.
I tried to auto-replace " />" with ">", but this doesn't work either.
Does anyone know how to get rid of this behaviour?

Thanks!
Geert-Emo
User avatar
MikeyB
Top Contributor
Posts: 511
Joined: Fri Jun 09, 2006 10:38 am
Location: UK
Contact:

Re: New line element (<br>) in Rapid PHP 2011

Post by MikeyB »

The behaviour depends on the doctype you are using for your HTML page.

If you are using XHTML then all tags MUST be closed with a / even single ones like <br> or <img src="image.jpg"> become <br /> and <img src="image.jpg" />
Other tags like <p> always end with </p> anyway so they are no different.

If you are using HTML 4 (not sure about HTML 5) than you can use <br>

WeBuilder, and I guess RapidPHP, picks up which doctype you are using and adjusts to suite.
I find it a very good feature as it saves quite a lot of keystrokes, and you don't forget to add them!

Mike
geertemo
Posts: 10
Joined: Tue Mar 20, 2012 4:27 pm

Re: New line element (<br>) in Rapid PHP 2011

Post by geertemo »

Hi MikeyB,

Thanks for your reaction!
In the meantime I found out that the behaviour stops when you uncheck the Auto complete HTML tags option (in language options HTML).
As I am writing HTML, not XHTML, and I still got the " />" ending I think the program does not change it's behaviour depending on the doctype.
I am a neat freak, so I guess I will have to keep typing the end tags myself :)

Geert-Emo
User avatar
MikeyB
Top Contributor
Posts: 511
Joined: Fri Jun 09, 2006 10:38 am
Location: UK
Contact:

Re: New line element (<br>) in Rapid PHP 2011

Post by MikeyB »

Glad you got it sorted.
geertemo wrote:I think the program does not change it's behaviour depending on the doctype.
I tested this yesterday, and again today, and my WeBuilder definitely only puts /> if it's an XHTML doctype, if it's standard HTML then all I get is >
geertemo
Posts: 10
Joined: Tue Mar 20, 2012 4:27 pm

Re: New line element (<br>) in Rapid PHP 2011

Post by geertemo »

So I just bought the wrong program... :cry:
Thanks for sorting this out :lol:
G.E.
User avatar
MikeyB
Top Contributor
Posts: 511
Joined: Fri Jun 09, 2006 10:38 am
Location: UK
Contact:

Re: New line element (<br>) in Rapid PHP 2011

Post by MikeyB »

geertemo wrote:So I just bought the wrong program... :cry:
Thanks for sorting this out :lol:
G.E.
What makes you say this?

When I test it WeBuilder is behaving correctly for the doctype in the file, can you post your code so I can try it.

Mike
geertemo
Posts: 10
Joined: Tue Mar 20, 2012 4:27 pm

Re: New line element (<br>) in Rapid PHP 2011

Post by geertemo »

No code necessary: I had the HTML5 ruleset loaded and then the /> occurs in a normal HTML document (which is not correct according to W3C http://www.w3.org/TR/html5/text-level-s ... br-element).
I loaded the HTML4.02 ruleset and now the > appears when writing normal HTML.

Geert-Emo
Post Reply