Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

replace links in output

Asked Modified Viewed 1,365 times
M
mawe4585
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
asked
Member

i have a question about the replace_in_output function.

i wanna do something like that:


replace_in_output("<!-- TEST_FLAG -->", "<a href='../index.php'>Test</a>");


But when i do this i get following error-message:

Parse error: syntax error, unexpected '/' in ......\xampp\htdocs\fusiontest\includes\output_handling_include.php(96) : eval()'d code on line 1

Merged on Apr 24 2012 at 21:07:19:
I fixed it by doing this:


$repl = "<a href='../index.php'>Test</a>";
$repl = str_replace("'","\'",$repl);
replace_in_output("<!-- TEST_FLAG -->",$repl);


is there a replace function which automatically escapes all these signs?
Edited by mawe4585 on 24-04-2012 20:07,
0 replies

1 post

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

I guess, the bad symbol there is only '
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 2 members

2 participants

M
M
  • Member, joined since
  • Contributed 84 posts on the community forums.
  • Started 34 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet