Page text: disable conversion of HTML links to HTML entities
up vote
1
down vote
favorite
I have an old Mediawiki site (1.6.x) and I need to upgrade it to 1.31. This site has many pages and many of them have text with html links in the HTML format such as:
<a href="/index.php?title=My_PAGE">Text</a>
I am able to upgrade its database to 1.31. However, in display, the above html links are converted to
<a href="/index.php?title=My_PAGE">TEXT</a>
How can I prevent Mediawiki (1.31.x) from performing the above conversion?
mediawiki
add a comment |
up vote
1
down vote
favorite
I have an old Mediawiki site (1.6.x) and I need to upgrade it to 1.31. This site has many pages and many of them have text with html links in the HTML format such as:
<a href="/index.php?title=My_PAGE">Text</a>
I am able to upgrade its database to 1.31. However, in display, the above html links are converted to
<a href="/index.php?title=My_PAGE">TEXT</a>
How can I prevent Mediawiki (1.31.x) from performing the above conversion?
mediawiki
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have an old Mediawiki site (1.6.x) and I need to upgrade it to 1.31. This site has many pages and many of them have text with html links in the HTML format such as:
<a href="/index.php?title=My_PAGE">Text</a>
I am able to upgrade its database to 1.31. However, in display, the above html links are converted to
<a href="/index.php?title=My_PAGE">TEXT</a>
How can I prevent Mediawiki (1.31.x) from performing the above conversion?
mediawiki
I have an old Mediawiki site (1.6.x) and I need to upgrade it to 1.31. This site has many pages and many of them have text with html links in the HTML format such as:
<a href="/index.php?title=My_PAGE">Text</a>
I am able to upgrade its database to 1.31. However, in display, the above html links are converted to
<a href="/index.php?title=My_PAGE">TEXT</a>
How can I prevent Mediawiki (1.31.x) from performing the above conversion?
mediawiki
mediawiki
edited Nov 10 at 18:02
halfer
14.2k757106
14.2k757106
asked Nov 7 at 17:01
curious1
6,0612179140
6,0612179140
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
I am uncertain presently how to prevent MediaWiki from changing your code, but a possible solution would be to use this
https://www.mediawiki.org/wiki/Extension:Replace_Text
after the upgrade to replace <
with <
and >
with >
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
add a comment |
up vote
0
down vote
accepted
Unable to find a method, I simply added the following two lines in public function execute()
of ExampleTemplate.php
$html = str_replace('<', '<', $html);
$html = str_replace('>', '>', $html);
Please let me know if you know a better way.
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I am uncertain presently how to prevent MediaWiki from changing your code, but a possible solution would be to use this
https://www.mediawiki.org/wiki/Extension:Replace_Text
after the upgrade to replace <
with <
and >
with >
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
add a comment |
up vote
1
down vote
I am uncertain presently how to prevent MediaWiki from changing your code, but a possible solution would be to use this
https://www.mediawiki.org/wiki/Extension:Replace_Text
after the upgrade to replace <
with <
and >
with >
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
add a comment |
up vote
1
down vote
up vote
1
down vote
I am uncertain presently how to prevent MediaWiki from changing your code, but a possible solution would be to use this
https://www.mediawiki.org/wiki/Extension:Replace_Text
after the upgrade to replace <
with <
and >
with >
I am uncertain presently how to prevent MediaWiki from changing your code, but a possible solution would be to use this
https://www.mediawiki.org/wiki/Extension:Replace_Text
after the upgrade to replace <
with <
and >
with >
answered Nov 7 at 18:03
Hershel
1497
1497
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
add a comment |
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
Thanks for chiming in! Do you mean replace '<' or '>' in database? '<a href="/index.php?title=My_PAGE">Text</a>' is stored in the MySQL database. No '<' or '>' is stored.
– curious1
Nov 7 at 18:26
add a comment |
up vote
0
down vote
accepted
Unable to find a method, I simply added the following two lines in public function execute()
of ExampleTemplate.php
$html = str_replace('<', '<', $html);
$html = str_replace('>', '>', $html);
Please let me know if you know a better way.
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
add a comment |
up vote
0
down vote
accepted
Unable to find a method, I simply added the following two lines in public function execute()
of ExampleTemplate.php
$html = str_replace('<', '<', $html);
$html = str_replace('>', '>', $html);
Please let me know if you know a better way.
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Unable to find a method, I simply added the following two lines in public function execute()
of ExampleTemplate.php
$html = str_replace('<', '<', $html);
$html = str_replace('>', '>', $html);
Please let me know if you know a better way.
Unable to find a method, I simply added the following two lines in public function execute()
of ExampleTemplate.php
$html = str_replace('<', '<', $html);
$html = str_replace('>', '>', $html);
Please let me know if you know a better way.
answered Nov 7 at 23:53
curious1
6,0612179140
6,0612179140
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
add a comment |
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
This is dangerous as this enables full html capabilities for everyone who can edit the wiki.
– FO-nTTaX
Nov 10 at 19:30
Thanks for your input!
– curious1
Nov 10 at 22:29
Thanks for your input!
– curious1
Nov 10 at 22:29
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194291%2fpage-text-disable-conversion-of-html-links-to-html-entities%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown