Title: Formatting/rendering issues
Last modified: October 2, 2024

---

# Formatting/rendering issues

 *  [datacate](https://wordpress.org/support/users/datacate/)
 * (@datacate)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/formatting-rendering-issues/)
 * Hi – nice plugin! There are a couple of minor issues I have not been able to 
   sort out.
 * One is that links and hashtags don’t render correctly. Here’s some actual text
   from a LinkedIn post being displayed on a dev website (not visible to public)
   using your plugin:
 * `2 weeks left, and the excitement is building! We can’t wait to showcase our 
   latest projects and learn from other accessibility champions. {hashtag|\#|CASI2024}{
   hashtag|\#|BlueDAG} <a target="_blank" href="https://lnkd.in/gvCAQEh6">https://
   lnkd.in/gvC`
 * The other issue is that the text above actually flows past the container that
   holds the plugin shortcode on its right side, so the display of the text is partially
   cut off along that edge. I’ve tried various CSS for that block, but have not 
   been able to alleviate the issue.
 * Screenshot showing both issues here: [https://imgur.com/a/3YuTB9J](https://imgur.com/a/3YuTB9J)
 * TIA

Viewing 1 replies (of 1 total)

 *  Thread Starter [datacate](https://wordpress.org/support/users/datacate/)
 * (@datacate)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/formatting-rendering-issues/#post-18052842)
 * In case anyone else needs this, you can fix the rendering issues by editing /
   plugins/company-posts-for-linkedin/public/class-linkedin-company-posts-public.
   php as follows:
    1. Add two more regex lines:
 *     ```wp-block-code
       $post_content = preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a target="_blank" href="$1">$1</a>', $post['content']);// above is the existing regex in the file. Add the next two lines immediately below it:$post_content = preg_replace('/{hashtag|\\#|/', '#', $post_content);$post_content = preg_replace('/}/', '', $post_content);
       ```
   
 * 2. Remove URL escaping:
 *     ```wp-block-code
       $company_posts .= '<span class="linkedin-title">' .esc_html($post_content) . '</span>';// above is the existing line with html escaping of the content. Edit it to remove the esc_html() function:$company_posts .= '<span class="linkedin-title">' . $post_content . '</span>';
       ```
   
 * This will fix up the display. Hashtags will display as plain text prepended by
   the ‘#’ symbol, but will not have a link. http/https link URLs will be displayed
   and linked appropriately.

Viewing 1 replies (of 1 total)

The topic ‘Formatting/rendering issues’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/company-posts-for-linkedin_25669f.
   svg)
 * [Company Posts for LinkedIn](https://wordpress.org/plugins/company-posts-for-linkedin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/company-posts-for-linkedin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/company-posts-for-linkedin/)
 * [Active Topics](https://wordpress.org/support/plugin/company-posts-for-linkedin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/company-posts-for-linkedin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/company-posts-for-linkedin/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [datacate](https://wordpress.org/support/users/datacate/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/formatting-rendering-issues/#post-18052842)
 * Status: not resolved