PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

PostPosted: Wed Dec 31, 2008 11:45 am Reply with quote Back to top

There appears to not be a simple workaround for this.

We use a lot of backslashes when writing FAQS using the editor, such as:
Quote:
C:\Documents and Settings\[User Name]\Application Data\Thunderbird\Profiles on Windows XP/2000


The special character function in the editor does now allow for a backslash \ because the character menu additon is \' which only displays the single quote ' in the finished FAQ.

The workaround is to manually type in C:\ which is the ascii representation for the backslash. That said and done, IF you save it and then come back to edit the FAQ in the editor you lose the \ and have to manually enter the &#92: for each backslash once again.

This seems to a problem in Windows and not necessarily the FCKEditor because it's the same annoyance in other Nuke versions as well that do not use FCK.

Suggestions ??

Cheers
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5997

PostPosted: Wed Dec 31, 2008 12:57 pm Reply with quote Back to top

Is it just in the FAQ module?
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

PostPosted: Wed Dec 31, 2008 2:54 pm Reply with quote Back to top

Actually I renamed Content to FAQ in the Main Menu but it seems the problem exists anywhere that text can be entered and not just using the Advanced Editor. It does the same thing regardless if the Advanced Editor is enabled or not. I disabled it in rnconfig and then entered a path with backslashes in the footer and it stuck but when returning to preferences / footer the backslashes were removed. Must be something inherent in Nuke and not the editor or simply treated as an illegal character. Using \ will be permanent but just a nuisance.

I thought I remember seeing somewhere in nuke where you could enter acceptable characters in some preference/whatever.

Cheers
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

PostPosted: Wed Dec 31, 2008 3:05 pm Reply with quote Back to top

I just consulted my son the MySQL / UNIX guru and he mentioned that it has something to do with addslashes/stripslashes and SQL injection hacks, etc. where the \ has to be escaped ... or something like that ... he was too busy to make a reasonable explanation. But that little tidbit does ring a bell. But he did emphasize that it is NOT the editor that is a culprit.


Cheers
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Wed Dec 31, 2008 4:31 pm Reply with quote Back to top

Correct, phpNuke has been badly implementing addslashes (rather its pretty consistent use of stripslashes for no reason) rather than checking whether magic_quotes is running or not.
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

PostPosted: Wed Dec 31, 2008 6:16 pm Reply with quote Back to top

I can turn magic_quotes on/off and it makes no difference either way.

Cheers
View user's profile Send private message
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Tue Jan 06, 2009 5:30 am Reply with quote Back to top

dad7732, need to know if this is Content or Content Plus (based upon your other threads). This can be fixed as I have fixed it in other modules, but it takes re-working of code. Sad
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

PostPosted: Tue Jan 06, 2009 8:18 am Reply with quote Back to top

It's everywhere that text can be entered, not exclusive to any module. However, yes I am using the Content Plus module to answer your question. I use that module to author my FAQS and most annoying when typing in paths with backslashes.

The only exclusion is posting in the forums.
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1253
Location: Texas, USA

PostPosted: Sat Jul 17, 2010 1:07 pm Reply with quote Back to top

I ran into a similar "Annoying Special Character Flaw" with the use of the special characters
¼
½
¾


which the preview feature (or posting the content) of the editor converts to
¼
½
¾


if I use
& # 188;
& # 189;
& # 190;

(forums where converting these so i added spaces)

¼
½
¾


it works as long as I don't preview it in the editor, but if I have to edit the document, the preview changes it back to
¼
½
¾


which ends up producing Sad
¼
½
¾


any ideas? btw, I'm using Content Plus for this...
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2406
Location: Pennsylvania

PostPosted: Sat Jul 17, 2010 5:33 pm Reply with quote Back to top

All I can suggest is to add an html_enitiy_decode() before the htmlentites() functions that are causing the problem. We can look into it more for RN 3.0 as we are moving to UTF-8 and redoing the filtering. Hopefully also the editor.
View user's profile Send private message Visit poster's website
montego
Former Admin in Good Standing


Joined: Aug 29, 2004
Posts: 9071
Location: Arizona

PostPosted: Wed Jul 21, 2010 8:20 pm Reply with quote Back to top

Yup, definitely the passing of the data in the hidden fields within the Preview function. I have experienced that in various modules over the years. For the HTML Newsletter, in order to retain XHTML compliance, I had to encode at least the special characters that are in the hidden fields and then decode them on the way back "out" after the preview was done. Otherwise, if one leaves the special characters in the data, it breaks compliance. So, I believe even UTF-8 and the new filtering is not going to fix this IF you wish to remain XHTML compliant. Wink
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1253
Location: Texas, USA

PostPosted: Thu Jul 22, 2010 10:59 am Reply with quote Back to top

Well I've been scratching my head on this one...

this issue seems two fold... the FCKeditor can't handle (coverts it)
HTML Entity (decimal) & #189;

and the filtering that happens in Content Plus can't handle
HTML Entity (named) & frac12;

I tried editing the fckeditor to use
& #189;
with only partial success, and the fck javascript is pretty complicated so I don't think I can see that thru. Sad

I don't see any use of htmlentities() functions in content plus, but I did see use of

$text = real_escape_content($_POST['text']);


Code:
function real_escape_content($string) {
   if (!get_magic_quotes_gpc()) {
      $string = mysql_real_escape_string($string);
   } else {
      $string = mysql_real_escape_string(stripslashes($string));
   }

   return $string;
}


Is there some kses integration that I am missing? If so is there some reason these regex patterns would not match my fraction problem?
Code:

function kses_normalize_entities($string)
###############################################################################
# This function normalizes HTML entities. It will convert "AT&T" to the correct
# "AT&T", ":" to ":", "&#XYZZY;" to "&#XYZZY;" and so on.
###############################################################################
{
# Disarm all entities by converting & to &

  $string = str_replace('&', '&', $string);

# Change back the allowed entities in our entity whitelist

  $string = preg_replace('/&([A-Za-z][A-Za-z0-9]{0,19});/',
                         '&\\1;', $string);
  $string = preg_replace('/&#0*([0-9]{1,5});/e',
                         'kses_normalize_entities2("\\1")', $string);
  $string = preg_replace('/&#([Xx])0*(([0-9A-Fa-f]{2}){1,2});/',
                         '&#\\1\\2;', $string);

  return $string;
}


I need some way to represent fractions in my content pages for my current project, or it's going to turn into a real PITA.... as many pages will need to be edited several times... Sad
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum