Title: some chars mangled
Last modified: August 28, 2021

---

# some chars mangled

 *  Resolved [alexishuxley](https://wordpress.org/support/users/alexishuxley/)
 * (@alexishuxley)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/some-chars-mangled/)
 * I have included this shortcode in the page mentioned above:
 * [wpfgc url=”[https://svn.pasta.freemyip.com/main/wordpress/trunk/computing/articles/unix-signal-processing/sleep.c”%5D](https://svn.pasta.freemyip.com/main/wordpress/trunk/computing/articles/unix-signal-processing/sleep.c”%5D)
 * But the text “#include <somefile.h>”, which is included at the top of that URL
   gets mangled to just “#include”.
 * I tried applying a filter – actually just a wrapper around json_encode() – to
   see whether a filter could actually fix the problem, but it looks like even the
   filter is receiving the wrong text.
 * Can you advise? Thanks!
 * Alexis
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsome-chars-mangled%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [alexishuxley](https://wordpress.org/support/users/alexishuxley/)
 * (@alexishuxley)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/some-chars-mangled/#post-14815610)
 * I found a solution, which, unfortunately, does not use JSM’s plugin.
 * I used the code [here](https://havecamerawilltravel.com/notes/?wordpress%2Fwordpress_include_external_content)
   and extended it a little to return `esc_html(@file_get_contents($file));`.
 * (I had already tried adding a filter to WP to call `esc_html()`, so that I could
   continue to use JSM’s plugin, but that silently failed.)
 * (Links above no longer show JSM’s plugin mangling text.)
    -  This reply was modified 4 years, 9 months ago by [alexishuxley](https://wordpress.org/support/users/alexishuxley/).
    -  This reply was modified 4 years, 9 months ago by [alexishuxley](https://wordpress.org/support/users/alexishuxley/).
 *  Plugin Author [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * (@jsmoriss)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/some-chars-mangled/#post-14816696)
 * I’ve added an ‘esc_html’ attribute (false by default) in v2.4.0.
 * js.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘some chars mangled’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-get-contents/assets/icon-256x256.jpg?rev=2396826)
 * [JSM file_get_contents() Shortcode](https://wordpress.org/plugins/wp-file-get-contents/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-get-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-get-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-get-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-get-contents/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [JS Morisset](https://wordpress.org/support/users/jsmoriss/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/some-chars-mangled/#post-14816696)
 * Status: resolved