function fp_reduce_whitespace

6.x fp_reduce_whitespace($str)
7.x fp_reduce_whitespace($str)
4.x fp_reduce_whitespace($str)
5.x fp_reduce_whitespace($str)

Simple helper function to reduce whitespace (like double-spaces)


string $str:

7 calls to fp_reduce_whitespace()
advise_popup_display_summary in modules/advise/
Displays the printable advising summary.
AdvisingScreen::display_popup_substitute in classes/AdvisingScreen.php
This is used to display the substitution popup to a user, to let them actually make a substitution.
fp_get_js_alert_link in includes/
Creates a javascript "alert" link, which tells the user some message with javascript alert().
fp_get_js_confirm_link in includes/
Creates a javascript "confirm" link, so when clicked it asks the user a question, then proceeds if they select OK. The main reason I want to do this is so I can pass the $question through my t() function. (do it when you call this function)
fp_get_js_prompt_link in includes/
Creates a javascript "prompt" link, which will ask the user a question.

... See full list


includes/, line 2820
This file contains misc functions for FlightPath


function fp_reduce_whitespace($str) {
  // Cheap hack to get rid of whitespace    
  for ($t = 0; $t < 5; $t++) {
    $str = str_replace("  ", " ", $str);
    $str = str_replace("\n ", "\n", $str);

  return $str;