Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1,18 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Editor Library: Core Class
* Last Updated: $Date: 2009-10-01 16:51:20 -0400 (Thu, 01 Oct 2009) $
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 5194 $
* @version $Revision: 5713 $
*
* EXAMPLE USAGE
* <code>
@@ -1,18 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Editor Library: RTE (WYSIWYG) Class
* Last Updated: $Date: 2009-11-13 19:55:00 -0500 (Fri, 13 Nov 2009) $
* Last Updated: $Date: 2010-11-15 11:39:10 -0500 (Mon, 15 Nov 2010) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 5405 $
* @version $Revision: 7185 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -107,7 +109,7 @@ class class_editor_module extends class_editor
// Trim
//-----------------------------------------
$t = trim($t);
$t = rtrim($t);
//-------------------------------
// Convert all types of single quotes
@@ -150,7 +152,8 @@ class class_editor_module extends class_editor
$t = str_ireplace( "<br />\r\n", "<br />", $t );
$t = str_ireplace( "<br />\n", "<br />", $t );
$t = str_ireplace( "<br />\r", "<br />", $t );
$t = preg_replace( "/((?:\r)?\n?(?:\s)+)/u", " ", $t );
//$t = preg_replace( "/((?:\r)?\n?(?:[\r|\n|\t| ])+)/", " ", $t );
$t = preg_replace( "/((?:\r)?\n+)/u", " ", $t );
}
else
@@ -206,7 +209,7 @@ class class_editor_module extends class_editor
//-----------------------------------------
$t = str_replace( " ", "&nbsp;&nbsp;", $t );
return $t;
}
@@ -222,7 +225,7 @@ class class_editor_module extends class_editor
//-----------------------------------------
// INIT
//-----------------------------------------
$tag = $matches[1];
$txt = $matches[2];
@@ -249,9 +252,9 @@ class class_editor_module extends class_editor
* @param string Form field name OR Raw text
* @return string Text ready for editor
*/
public function processAfterForm( $form_field )
public function processAfterForm( $form_field, $isDefinitelyFullText=false )
{
$t = isset( $_POST[ $form_field ] ) ? IPSText::stripslashes($_POST[ $form_field ]) : $form_field;
$t = ( $isDefinitelyFullText ) ? $form_field : ( isset( $_POST[ $form_field ] ) ? IPSText::stripslashes($_POST[ $form_field ]) : $form_field );
$ot = $t;
//print $t;
@@ -265,7 +268,7 @@ class class_editor_module extends class_editor
$t = str_replace( '&nbsp;&nbsp;&nbsp; ', "{'tab'}", $t );
$t = str_replace( '&nbsp;', ' ', $t );
//print htmlspecialchars($t);print "<br><br><br>---------------------<br><br><br>";
//-----------------------------------------
// Fix up lines for safari...
//-----------------------------------------
@@ -290,7 +293,8 @@ class class_editor_module extends class_editor
$t = str_ireplace( "<br />\r\n", "<br />", $t );
$t = str_ireplace( "<br />\n", "<br />", $t );
$t = str_ireplace( "<br />\r", "<br />", $t );
$t = preg_replace( "/((?:\r)?\n?(?:\s)+)/u", " ", $t );
//$t = preg_replace( "/((?:\r)?\n?(?:[\r|\n|\t| ])+)/", " ", $t );
$t = preg_replace( "/((?:\r)?\n+)/u", " ", $t );
}
else
@@ -315,8 +319,11 @@ class class_editor_module extends class_editor
// Fix up incorrectly nested urls / BBcode
//-----------------------------------------
// @link http://community.invisionpower.com/tracker/issue-24704-pasting-content-in-rte-with-image-first/
// Revert the fix for now as it causes more issues than the original one
$t = preg_replace( '#<a\s+?href=[\'"]([^>]+?)\[(.+?)[\'"](.+?)'.'>(.+?)\[\\2</a>#is', '<a href="\\1"\\3>\\4</a>[\\2', $t );
//$t = preg_replace( '#<a\s+?href=[\'"]([^>\'"]+?)[\'"](.*?)>(.+?)\[([^<]+?)</a>#is', '<a href="\\1">\\3</a>[\\4', $t );
//-----------------------------------------
// Make URLs safe (prevent tag stripping)
//-----------------------------------------
@@ -380,6 +387,16 @@ class class_editor_module extends class_editor
$t = preg_replace( "#<font (color|size|face)=\"([a-zA-Z0-9\s\#\-]*?)\">(\s*)</font>#is", " ", $t );
//-----------------------------------------
// WYSI-Weirdness #5a: Fix up smilies: IE RTE
// @see Ticket 623146
//-----------------------------------------
$t = preg_replace( "#<img class=(\S+?) alt=(\S+?) src=[\"'](.+?)[\"']>#i", "<img src='\\3' class='\\1' alt='\\2' />", $t );
$t = preg_replace( "#alt='[\"'](\S+?)['\"]'#i", "alt='\\1'", $t );
$t = preg_replace( "#class='[\"'](\S+?)['\"]'#i", "class='\\1'", $t );
$t = preg_replace( "#([a-zA-Z0-9])<img src=[\"'](.+?)[\"'] class=[\"'](.+?)[\"'] alt=[\"'](.+?)[\"'] />#i", "\\1 <img src='\\2' class='\\3' alt='\\4' />", $t );
//-----------------------------------------
// WYSI-Weirdness #5: Fix up smilies
//-----------------------------------------
@@ -395,6 +412,7 @@ class class_editor_module extends class_editor
// WYSI-Weirdness #6: Image tags
//-----------------------------------------
$t = preg_replace( "#<img alt=[\"'][\"'] height=[\"']\d+?[\"'] width=[\"']\d+?[\"']\s+?/>#", "", $t );
$t = preg_replace( "#<img.+?src=[\"'](.+?)[\"']([^>]+?)?".">#is", "[img]\\1[/img]", $t );
//-----------------------------------------
@@ -515,7 +533,7 @@ class class_editor_module extends class_editor
//-----------------------------------------
$t = $this->_cleanPost( $t );
//print htmlspecialchars($t);exit;
//-----------------------------------------
// Debug?
//-----------------------------------------
@@ -961,7 +979,7 @@ class class_editor_module extends class_editor
//-----------------------------------------
// Start the loop
//-----------------------------------------
while ( $tag_begin_loc !== FALSE )
{
$lowtext = mb_strtolower($text);
@@ -1194,6 +1212,7 @@ class class_editor_module extends class_editor
break;
case 'font-size: xxx-large;':
case 'font-size: -webkit-xxx-large;':
$matches[3] = 'font-size: 36;';
break;
}
@@ -1,18 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Editor Library: Standard Class
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
* Last Updated: $Date: 2010-05-25 10:50:21 -0400 (Tue, 25 May 2010) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 3887 $
* @version $Revision: 6387 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -46,9 +48,9 @@ class class_editor_module extends class_editor
* @param string Form field name OR Raw text
* @return string Text ready for editor
*/
public function processAfterForm( $form_field )
public function processAfterForm( $form_field, $isDefinitelyFullText=false )
{
$content = isset( $_POST[ $form_field ] ) ? $_POST[ $form_field ] : $form_field;
$content = ( $isDefinitelyFullText ) ? $form_field : ( isset( $_POST[ $form_field ] ) ? $_POST[ $form_field ] : $form_field );
return $this->_cleanPost( trim($content) );
}
+10 -1
View File
@@ -1 +1,10 @@
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionboard.com/">IP.Board</a>
</body>
</html>