Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-11-10 07:07:58

MartinNilsson
New member
Registered: 2005-11-10
Posts: 1

ASP, php tags in edited page?

Hi,

This must be a FAQ but I can't find any answer for it.

I want to edit html files that have scripting tags in them. The tags I use are <% and %> I have an escape function in my serverside mod_perl code that converts all < and > to < and > when they are in html tags but it preserves my <% %> tags, I use this to generate the contents for the textarea to be edited.

When editing the above with Xinha all remaining < > characters are translated and thus the source HTML view does not display my code tags correctly.

Is there a solution to this or should I hack the Xinha .js code?

Regards,
Martin

Offline

#2 2005-11-13 20:28:21

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: ASP, php tags in edited page?

Xinha is an HTML editor, not a php, or asp, or jsp or whatever editor.

There is currently no built in way to do this, all HTML edited by xinha must be well formed valid html.

For example, this is not...

<table>
<? ... ?>
<tr>
</tr>
<? ... ?>
</table>

for two reasons, firstly <? ... ?> isn't valid HTML (the browser *might* let you away with it because <? is a processing instruction in XML, but I doubt it), and secondly because you can only put thead, tbody, tfoot and tr inside a table tag.

There has been talk in the past about making something like the dreamweaver "shielded" code, but it's not clear how that would work with keeping the HTML code valid for Xinha.


James Sleeman

Offline

#3 2005-11-15 17:40:12

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: ASP, php tags in edited page?

There is no way to do this with XML, but there is with PHP. See http://xinha.python-hosting.com/ticket/4

Offline

#4 2005-12-01 20:21:25

clouserw
New member
Registered: 2005-07-07
Posts: 3

Re: ASP, php tags in edited page?

We came across this last year when we were building our CMS.  We ended up parsing out the php before it hit the editor, and putting it back in when the user hit submit.  Place holders were put in place so the user knew where the PHP was.  We use <span>'s for placeholders and style them with a background-image/border with CSS.

Offline

Board footer

Powered by FluxBB