Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> WYSIWYG - Raven's RavenNuke(tm) v2.x Distro
Author Message
spottedhog
Regular
Regular


Joined: Jun 02, 2004
Posts: 88

PostPosted: Sun Apr 23, 2006 7:26 am Reply with quote

I may have just found a possible error in the $AllowableHTML code that is placed in the config.php file..... And if I am correct, this may be the problem that others posted are having.

Here is a line from the $AllowableHTML:

"font" => array("face" => 1, "style" => 1, "color" => 1, "size" => array("minval" => 1, "maxval" => 7)),

Please note the array after "size" =>

If I am not mistaken, the only values allowed are either 1 or 2.

I think what the author was thinking was that they could control the font size from this line of code. However, this code is only for allowing attributes or not. It could never control the font size inputs.......

I would think deleting that size array and replacing it with 1 would fix these problems.......

......but I have been wrong many times before.... lol. Wink
 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Apr 23, 2006 9:36 am Reply with quote

Your post sure got me looking at the books Spottedhog. I'm no expert with arrays at all. But if you have a system you can experiment with a little, try inserting the following three lines after the $AllowableHTML array has finished being assigned.

Code:
echo $AllowableHTML['font']['face'] . '<br>';

echo $AllowableHTML['font']['size']['minval'] . '<br>';
echo $AllowableHTML['font']['size']['maxval'] . '<br>';


It just looks like an "unbalanced" array, i.e., one with both 1 and 2 elements under "font" but it probably should work. At least the values of face (one level under font) and minval (two levels under) echo out okay.

One of the experts could probably write some kind of foreach loop that would automatically dump out all the elements of the array.
 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Apr 23, 2006 5:45 pm Reply with quote

If they changed the check_html function for the WYSIWYG editor, then maybe those arrays will work. As far as I've seen, for standard phpNuke it is either "1" or "2" - with no way to specify which attributes to allow.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
montego
Site Admin


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

PostPosted: Sun Apr 23, 2006 7:01 pm Reply with quote

The nukeWYSIWYG editor installation instructions does have you replace the check_html() function to use its own. It works alot better than the original check_html() function and has more flexibility for validating the allowed HTML.

We would need Kguske to validate that the KSES routines are handling the validation of the font size attribute correctly.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> WYSIWYG - Raven's RavenNuke(tm) v2.x Distro

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©