original_string: protected function build_node_path($id, $name = '', $root = '') {
          $path = $id;
          if (!empty($name)) {
              $path .= '|' . urlencode($name);
          }
          if (!empty($root)) {
              $path = trim($root, '/') . '/' . $path;
          }
          return $path;
      }
code: protected function build_node_path($id, $name = '', $root = '') {
          $path = $id;
          if (!empty($name)) {
              $path .= '|' . urlencode($name);
          }
          if (!empty($root)) {
              $path = trim($root, '/') . '/' . $path;
          }
          return $path;
      }
code_tokens: protected function build_node_path ( $ id , $ name = '' , $ root = '' ) { $ path = $ id ; if ( ! empty ( $ name ) ) { $ path .= '|' . urlencode ( $ name ) ; } if ( ! empty ( $ root ) ) { $ path = trim ( $ root , '/' ) . '/' . $ path ; } return $ path ; }
docstring: Generates a safe path to a node.
  
  Typically, a node will be id|Name of the node.
  
  @param string $id of the node.
  @param string $name of the node, will be URL encoded.
  @param string $root to append the node on, must be a result of this function.
  @return string path to the node.
docstring_tokens: Generates a safe path to a node .