• Resolved illicious

    (@illicious)


    I have a tags cloud page where tags links are combined with no spaces in between them, together as one big word instead of being responsive to the page size.

    Btw, my link tags are comma separated in the backend.

    Here is an example of the issue:

    Tag links normally would be:
    <a>Art</a>
    <a>Food</a>
    <a>Music</a>
    Results: Art Food Music 
    
    Minify: 
    <a>Art</a><a>Food</a><a>Music</a>
    Results: ArtFoodMusic
    
    Is there some minify-html.php edit I can do to fix this?
    
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter illicious

    (@illicious)

    I think I have made a temporary fix:

    On line 105 change:

    $buffer = str_ireplace(array ('<script', '/script>', '<pre', '/pre>', '<textarea', '/textarea>', '<style', '/style>'), array ('M1N1FY-ST4RT<script', '/script>M1N1FY-3ND', 'M1N1FY-ST4RT<pre', '/pre>M1N1FY-3ND', 'M1N1FY-ST4RT<textarea', '/textarea>M1N1FY-3ND', 'M1N1FY-ST4RT<style', '/style>M1N1FY-3ND'), $buffer);

    With:

    $buffer = str_ireplace(array ('<a', '/a>', '<script', '/script>', '<pre', '/pre>', '<textarea', '/textarea>', '<style', '/style>'), array ('M1N1FY-ST4RT<a', '/a>M1N1FY-3ND', 'M1N1FY-ST4RT<script', '/script>M1N1FY-3ND', 'M1N1FY-ST4RT<pre', '/pre>M1N1FY-3ND', 'M1N1FY-ST4RT<textarea', '/textarea>M1N1FY-3ND', 'M1N1FY-ST4RT<style', '/style>M1N1FY-3ND'), $buffer);

    I simply added “<a></a>” links and now its working.

    Thread Starter illicious

    (@illicious)

    Small correction.

    “On line 105 change:” Should be “On line 53 change:”

    Or just look for the string listed in the earlier post

    Plugin Author Tim Eckel

    (@teckel)

    This only fixes your unique problem, it’s incorrect in other situations and there’s others which wouldn’t work.

    The problem is with how your creating the HTML. You’re using carriage returns as white space. Instead, you should be doing this one of two ways. One, adding a ;nbsp between the links, or two, adding CSS to add a space. Changing this plugin doesn’t really resolve anything, other than your unique HTML situation.

    Thread Starter illicious

    (@illicious)

    I’m aware of this as this was only a quick temporary fix until I have more time to look through long lines of codes.

    Thanks for your reply.

    Plugin Author Tim Eckel

    (@teckel)

    The problem is that you’re using an HTML coding style where you’re using carriage returns as padding, which is ambitious and doesn’t accommodate minification. Many other cases will have the same result after minification, not just anchor tags. I would do something like this:

    <span class=”link-list”>
    <a>Art</a>
    <a>Food</a>
    <a>Music</a>
    </span>

    And then use link-list to style the spacing with something like margin-right:1em

    Thread Starter illicious

    (@illicious)

    I understand.

    I just had to narrow down the issue and make sure there wasn’t any conflicts.

    I have restored the Minify plugin to it’s unmodified normal state and added/altered the custom tags plugin’s css.

    It now works find with or without html minify

    Thanks for time and great plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Some links are together as a whole word.’ is closed to new replies.