private function unescape($value, $escaped) { if ($this->value instanceof NumberValue) { $value = $escaped ? str_replace(array('-20', '-2D'), array(' ', '-'), $value) : $value; // Do not try to decode things like 1.2e-13 // Signals that we don't want any precision limitation $this->value->setOption('no.displayprecision', true); } elseif ($this->value instanceof TelephoneUriValue) { $value = $escaped ? str_replace(array('-20', '-2D'), array(' ', '-'), $value) : $value; // No encoding to avoid turning +1-201-555-0123 // into +1 1U523 or further obfuscate %2B1-2D201-2D555-2D0123 ... } else { $value = $escaped ? $this->urlEncoder->unescape($value) : $value; } return $value; }