note 97324 added to function.preg-replace

From: Date: Wed, 14 Apr 2010 16:45:38 +0000
Subject: note 97324 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-168234@lists.php.net to get a copy of this message
I would like to replace the ampersand signs with character entity references in URLs entered by people to meet validation requirements. The hyperlinks are entered as BBCode and - when ready to be displayed - look like <a href="url">whatever</a>. I have managed to write an expression to replace one of the ampersands but only one (the last one). Can anyone help? ---- Server IP: 92.43.200.200 Probable Submitter: 89.134.155.230 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- https://master.php.net/note/edit/97324 Del: integrated -- https://master.php.net/note/delete/97324/integrated Del: useless -- https://master.php.net/note/delete/97324/useless Del: bad code -- https://master.php.net/note/delete/97324/bad+code Del: spam -- https://master.php.net/note/delete/97324/spam Del: non-english -- https://master.php.net/note/delete/97324/non-english Del: in docs -- https://master.php.net/note/delete/97324/in+docs Del: other reasons-- https://master.php.net/note/delete/97324 Reject -- https://master.php.net/note/reject/97324 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168234) next »