Long URL breake my html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dr. zoidberg

    Long URL breake my html

    Hello,

    I have small BB and when someone post long URL it breaks complete forum.
    Is there anything I can do.

    TNX


  • Christopher Vogt

    #2
    Re: Long URL breake my html

    what do you mean it "breaks" the forum?

    try your luck with html_entities() , html_entity_dec ode(), urlencode()
    and urldecode() or try to detect urls in the post via regex or some
    library you'll find in the web, there are lots of such libraries. When
    you detect it you can href it an shorten the shown text for example

    Hope this helps,

    Chris

    dr. zoidberg schrieb:[color=blue]
    > Hello,
    >
    > I have small BB and when someone post long URL it breaks complete forum.
    > Is there anything I can do.
    >
    > TNX
    >
    >[/color]

    Comment

    • Pedro Graca

      #3
      Re: Long URL breake my html

      dr. zoidberg wrote:[color=blue]
      > Hello,
      >
      > I have small BB and when someone post long URL it breaks complete forum.
      > Is there anything I can do.[/color]

      <?php
      // ...
      $limit = 78; // max length of allowed URLs
      // ...

      if (strlen($url) > $limit) {
      exit('Sorry, your URL is too long for this BB.');
      }
      // ...
      ?>
      --
      --= my mail box only accepts =--
      --= Content-Type: text/plain =--
      --= Size below 10001 bytes =--

      Comment

      Working...