Skip to content
Snippets Groups Projects
Commit 86b67732 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch...

Merge branch 'hotline#71540_probleme_de_connexion_d_un_usager_sur_la_webotheque52' into 'hotline-master'

hotline #71540 : CVS : fix xml validity when login contains ampersand

See merge request !2494
parents b1a8507c 1a55767a
3 merge requests!2514Master,!2513Hotline master,!2494hotline #71540 : CVS : fix xml validity when login contains ampersand
Pipeline #3504 passed with stage
in 27 minutes and 9 seconds
- ticket #71540 : Correctif du problème de connection à CVS avec un login contenant un caractère '&'
\ No newline at end of file
......@@ -163,7 +163,9 @@ class Class_CVSLink {
$xml_user_infos = '';
foreach($user_infos as $k => $v)
$xml_user_infos .= '<' . $k . '>' . $v . '</' . $k . '>';
$xml_user_infos .= '<' . $k . '>' .
preg_replace('#&(?![a-z]{1,6};)#i', '&amp;',$v).
'</' . $k . '>';
return $xml_user_infos;
}
......
......@@ -36,7 +36,7 @@ abstract class CVSLinkTestCase extends ModelTestCase {
->newInstanceWithId(4)
->setIdabon(34)
->setLogin(34)
->setPseudo('JKhan')
->setPseudo('J&Khan')
->setPrenom('Jerry')
->setNom('Khan')
->setMail('feu@essence.fr')
......@@ -144,7 +144,7 @@ class CVSLinkSearchTest extends CVSLinkTestCase {
<login>34</login>
<nom>Khan</nom>
<prenom>Jerry</prenom>
<pseudo>JKhan</pseudo>
<pseudo>J&amp;Khan</pseudo>
<password>secret</password>
<email>feu@essence.fr</email>
<dnaiss>1977-06-27</dnaiss>
......@@ -225,7 +225,7 @@ class CVSLinkWithAbonTest extends CVSLinkTestCase {
<login>34</login>
<nom>Khan</nom>
<prenom>Jerry</prenom>
<pseudo>JKhan</pseudo>
<pseudo>J&amp;Khan</pseudo>
<password>secret</password>
<email>feu@essence.fr</email>
<dnaiss>1977-06-27</dnaiss>
......@@ -300,7 +300,7 @@ class CVSLinkWithAbonAndLibraryLabelTest extends CVSLinkTestCase {
<login>34</login>
<nom>Khan</nom>
<prenom>Jerry</prenom>
<pseudo>JKhan</pseudo>
<pseudo>J&amp;Khan</pseudo>
<password>secret</password>
<email>feu@essence.fr</email>
<dnaiss>1977-06-27</dnaiss>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment