Loading...
 
Skip to main content
Author Coffeeshop

Author Coffeeshop


maintaining escaped HTML

posts: 2

I've been evaluating wikis for my company, and i'm stuck between mediawiki and tikiwiki. I far preferred TW until i ran into this problem: when i escape HTML and save the wiki page, the page renders correctly. However, when i next edit that page, the code served up in the edit textarea has replaced the escaped HTML entities with their actual entities... this means that on saving the edit, i've lost my escaped HTML with the result that my browser tries to render these tags.

for example, if i use the following code to create a code example and then save it:

Copy to clipboard
<dst:criteria> <dst:content> </dst:content> </dst:criteria>


the XML tags are displayed on the wiki page.

When i edit the page, this code chunk has replaced the escaped entities with the actual entities. when i save that page, i get a box containing only .

I can use the construct <dst:criteria> to escape these tags successfully, except inside the
Copy to clipboard
tag used to display the code example.


For my needs, this is a deal-killer. Now, even a limited wiki like xwiki has single character escaping using a backslash, so to display an xml tag i can just write \<dst:content\>.

Thanks, and I did search through the documentation and forum for this stuff but to no avail,
--derek

posts: 36 Japan

I checked in Tiki 1.9.8.3 and 1.10CVS (HTML not enabled in the wiki at either site). For inline escaping, the Tiki syntax is ~np~code~/np~. This worked in my check through several edit/save cycles. The syntax is listed in the help section at the bottom of the wiki edit page.

Tags are being stripped out in this reply, though. I don't know what the difference is between this site and my test sites.

-- Gary


posts: 2

yeah, my original post had the tags munged as i was describing, so let me try this again.

i've spaced out the characters that make up the html escaping of the html tags in the following, so you will have to extrapolate how the browser is supposed to render the code:

Copy to clipboard
& l t ; dst:criteria & g t ; & l t ; dst:content & g t ; & l t ; /dst:content & g t ; & l t ; /dst:criteria & g t ;


If i remove the spacing, then the browser renders the xml tags, but on saving it again the escaped html tags get converted into the HTML characters they represent, with the result that the next time the page is rendered, the browser attempts to process the tags as html.

Using the np approach doesn't affect the escaped characters; i'm not trying to stop code logic from executing or wiki logic from executing, i'm trying to keep html/xml tags rendering on the page and not processed by the browser.

what tikiwiki needs is a way to escape single characters and that works even if other wiki syntax is not processed. I can use the numeric escaping ~ 6 0 ~ dst:criteria ~ 6 2 ~ (with spaces so you can see the code), but that will NOT work inside np tags.

I hope this makes more sense, but this is precisely the problem: maintaining escaped HTML.

thanks,
--derek


 

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 50😎
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki