Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php |
— | — | @@ -67,17 +67,15 @@ |
68 | 68 | if ( $page_name != '' ) { |
69 | 69 | // Append the namespace prefix to the page name, |
70 | 70 | // if this namespace was not already entered. |
71 | | - if ( strpos( $page_name, $target_namespace . ":" ) === false && $target_namespace != '' ) |
72 | | - $page_name = $target_namespace . ":" . $page_name; |
| 71 | + if ( strpos( $page_name, $target_namespace . ':' ) === false && $target_namespace != '' ) |
| 72 | + $page_name = $target_namespace . ':' . $page_name; |
73 | 73 | // find out whether this page already exists, |
74 | 74 | // and send user to the appropriate form |
75 | 75 | $page_title = Title::newFromText( $page_name ); |
76 | 76 | if ( ! $page_title ) { |
77 | | - // if there was no page title, it's |
78 | | - // probably an invalid page name, |
79 | | - // containing forbidden characters |
80 | | - $error_msg = wfMsg( 'sf_formstart_badtitle', htmlspecialchars( $page_name ) ); |
81 | | - $wgOut->addHTML( $error_msg ); |
| 77 | + //If there was no page title, it's probably an invalid page name, |
| 78 | + // containing forbidden characters. |
| 79 | + $wgOut->addHTML( htmlspecialchars( wfMsg( 'sf_formstart_badtitle', $page_name ) ) ); |
82 | 80 | return; |
83 | 81 | } else { |
84 | 82 | SFFormStart::doRedirect( $form_name, $page_name, $params ); |
— | — | @@ -87,13 +85,16 @@ |
88 | 86 | } |
89 | 87 | |
90 | 88 | if ( ( ! $form_title || ! $form_title->exists() ) && ( $form_name != '' ) ) { |
91 | | - $text = '<p>' . wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) . ".</p>\n"; |
| 89 | + $text = '<p>' . htmlspecialchars( wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . ".</p>\n"; |
92 | 90 | } else { |
93 | | - if ( $form_name == '' ) |
94 | | - $description = wfMsg( 'sf_formstart_noform_docu', $form_name ); |
95 | | - else |
96 | | - $description = wfMsg( 'sf_formstart_docu', $form_name ); |
97 | | - $button_text = wfMsg( 'sf_formstart_createoredit' ); |
| 91 | + if ( $form_name == '' ) { |
| 92 | + $description = htmlspecialchars( wfMsg( 'sf_formstart_noform_docu', $form_name ) ); |
| 93 | + } |
| 94 | + else { |
| 95 | + $description = htmlspecialchars( wfMsg( 'sf_formstart_docu', $form_name ) ); |
| 96 | + } |
| 97 | + |
| 98 | + $button_text = htmlspecialchars( wfMsg( 'sf_formstart_createoredit' ) ); |
98 | 99 | $text = <<<END |
99 | 100 | <form action="" method="post"> |
100 | 101 | <p>$description</p> |