diff options
Diffstat (limited to 'tests/text_formatter/s9e/fixtures')
14 files changed, 990 insertions, 0 deletions
diff --git a/tests/text_formatter/s9e/fixtures/default_formatting.xml b/tests/text_formatter/s9e/fixtures/default_formatting.xml new file mode 100644 index 0000000000..2b7236fb30 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/default_formatting.xml @@ -0,0 +1,466 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_smilies"> + <column>smiley_id</column> + <column>code</column> + <column>emotion</column> + <column>smiley_url</column> + <column>smiley_width</column> + <column>smiley_height</column> + <column>smiley_order</column> + <column>display_on_posting</column> + <row> + <value>1</value> + <value>:D</value> + <value>Very Happy</value> + <value>icon_e_biggrin.gif</value> + <value>15</value> + <value>17</value> + <value>1</value> + <value>1</value> + </row> + <row> + <value>2</value> + <value>:-D</value> + <value>Very Happy</value> + <value>icon_e_biggrin.gif</value> + <value>15</value> + <value>17</value> + <value>2</value> + <value>1</value> + </row> + <row> + <value>3</value> + <value>:grin:</value> + <value>Very Happy</value> + <value>icon_e_biggrin.gif</value> + <value>15</value> + <value>17</value> + <value>3</value> + <value>1</value> + </row> + <row> + <value>4</value> + <value>:)</value> + <value>Smile</value> + <value>icon_e_smile.gif</value> + <value>15</value> + <value>17</value> + <value>4</value> + <value>1</value> + </row> + <row> + <value>5</value> + <value>:-)</value> + <value>Smile</value> + <value>icon_e_smile.gif</value> + <value>15</value> + <value>17</value> + <value>5</value> + <value>1</value> + </row> + <row> + <value>6</value> + <value>:smile:</value> + <value>Smile</value> + <value>icon_e_smile.gif</value> + <value>15</value> + <value>17</value> + <value>6</value> + <value>1</value> + </row> + <row> + <value>7</value> + <value>;)</value> + <value>Wink</value> + <value>icon_e_wink.gif</value> + <value>15</value> + <value>17</value> + <value>7</value> + <value>1</value> + </row> + <row> + <value>8</value> + <value>;-)</value> + <value>Wink</value> + <value>icon_e_wink.gif</value> + <value>15</value> + <value>17</value> + <value>8</value> + <value>1</value> + </row> + <row> + <value>9</value> + <value>:wink:</value> + <value>Wink</value> + <value>icon_e_wink.gif</value> + <value>15</value> + <value>17</value> + <value>9</value> + <value>1</value> + </row> + <row> + <value>10</value> + <value>:(</value> + <value>Sad</value> + <value>icon_e_sad.gif</value> + <value>15</value> + <value>17</value> + <value>10</value> + <value>1</value> + </row> + <row> + <value>11</value> + <value>:-(</value> + <value>Sad</value> + <value>icon_e_sad.gif</value> + <value>15</value> + <value>17</value> + <value>11</value> + <value>1</value> + </row> + <row> + <value>12</value> + <value>:sad:</value> + <value>Sad</value> + <value>icon_e_sad.gif</value> + <value>15</value> + <value>17</value> + <value>12</value> + <value>1</value> + </row> + <row> + <value>13</value> + <value>:o</value> + <value>Surprised</value> + <value>icon_e_surprised.gif</value> + <value>15</value> + <value>17</value> + <value>13</value> + <value>1</value> + </row> + <row> + <value>14</value> + <value>:-o</value> + <value>Surprised</value> + <value>icon_e_surprised.gif</value> + <value>15</value> + <value>17</value> + <value>14</value> + <value>1</value> + </row> + <row> + <value>15</value> + <value>:eek:</value> + <value>Surprised</value> + <value>icon_e_surprised.gif</value> + <value>15</value> + <value>17</value> + <value>15</value> + <value>1</value> + </row> + <row> + <value>16</value> + <value>:shock:</value> + <value>Shocked</value> + <value>icon_eek.gif</value> + <value>15</value> + <value>17</value> + <value>16</value> + <value>1</value> + </row> + <row> + <value>17</value> + <value>:?</value> + <value>Confused</value> + <value>icon_e_confused.gif</value> + <value>15</value> + <value>17</value> + <value>17</value> + <value>1</value> + </row> + <row> + <value>18</value> + <value>:-?</value> + <value>Confused</value> + <value>icon_e_confused.gif</value> + <value>15</value> + <value>17</value> + <value>18</value> + <value>1</value> + </row> + <row> + <value>19</value> + <value>:???:</value> + <value>Confused</value> + <value>icon_e_confused.gif</value> + <value>15</value> + <value>17</value> + <value>19</value> + <value>1</value> + </row> + <row> + <value>20</value> + <value>8-)</value> + <value>Cool</value> + <value>icon_cool.gif</value> + <value>15</value> + <value>17</value> + <value>20</value> + <value>1</value> + </row> + <row> + <value>21</value> + <value>:cool:</value> + <value>Cool</value> + <value>icon_cool.gif</value> + <value>15</value> + <value>17</value> + <value>21</value> + <value>1</value> + </row> + <row> + <value>22</value> + <value>:lol:</value> + <value>Laughing</value> + <value>icon_lol.gif</value> + <value>15</value> + <value>17</value> + <value>22</value> + <value>1</value> + </row> + <row> + <value>23</value> + <value>:x</value> + <value>Mad</value> + <value>icon_mad.gif</value> + <value>15</value> + <value>17</value> + <value>23</value> + <value>1</value> + </row> + <row> + <value>24</value> + <value>:-x</value> + <value>Mad</value> + <value>icon_mad.gif</value> + <value>15</value> + <value>17</value> + <value>24</value> + <value>1</value> + </row> + <row> + <value>25</value> + <value>:mad:</value> + <value>Mad</value> + <value>icon_mad.gif</value> + <value>15</value> + <value>17</value> + <value>25</value> + <value>1</value> + </row> + <row> + <value>26</value> + <value>:P</value> + <value>Razz</value> + <value>icon_razz.gif</value> + <value>15</value> + <value>17</value> + <value>26</value> + <value>1</value> + </row> + <row> + <value>27</value> + <value>:-P</value> + <value>Razz</value> + <value>icon_razz.gif</value> + <value>15</value> + <value>17</value> + <value>27</value> + <value>1</value> + </row> + <row> + <value>28</value> + <value>:razz:</value> + <value>Razz</value> + <value>icon_razz.gif</value> + <value>15</value> + <value>17</value> + <value>28</value> + <value>1</value> + </row> + <row> + <value>29</value> + <value>:oops:</value> + <value>Embarrassed</value> + <value>icon_redface.gif</value> + <value>15</value> + <value>17</value> + <value>29</value> + <value>1</value> + </row> + <row> + <value>30</value> + <value>:cry:</value> + <value>Crying or Very Sad</value> + <value>icon_cry.gif</value> + <value>15</value> + <value>17</value> + <value>30</value> + <value>1</value> + </row> + <row> + <value>31</value> + <value>:evil:</value> + <value>Evil or Very Mad</value> + <value>icon_evil.gif</value> + <value>15</value> + <value>17</value> + <value>31</value> + <value>1</value> + </row> + <row> + <value>32</value> + <value>:twisted:</value> + <value>Twisted Evil</value> + <value>icon_twisted.gif</value> + <value>15</value> + <value>17</value> + <value>32</value> + <value>1</value> + </row> + <row> + <value>33</value> + <value>:roll:</value> + <value>Rolling Eyes</value> + <value>icon_rolleyes.gif</value> + <value>15</value> + <value>17</value> + <value>33</value> + <value>1</value> + </row> + <row> + <value>34</value> + <value>:!:</value> + <value>Exclamation</value> + <value>icon_exclaim.gif</value> + <value>15</value> + <value>17</value> + <value>34</value> + <value>1</value> + </row> + <row> + <value>35</value> + <value>:?:</value> + <value>Question</value> + <value>icon_question.gif</value> + <value>15</value> + <value>17</value> + <value>35</value> + <value>1</value> + </row> + <row> + <value>36</value> + <value>:idea:</value> + <value>Idea</value> + <value>icon_idea.gif</value> + <value>15</value> + <value>17</value> + <value>36</value> + <value>1</value> + </row> + <row> + <value>37</value> + <value>:arrow:</value> + <value>Arrow</value> + <value>icon_arrow.gif</value> + <value>15</value> + <value>17</value> + <value>37</value> + <value>1</value> + </row> + <row> + <value>38</value> + <value>:|</value> + <value>Neutral</value> + <value>icon_neutral.gif</value> + <value>15</value> + <value>17</value> + <value>38</value> + <value>1</value> + </row> + <row> + <value>39</value> + <value>:-|</value> + <value>Neutral</value> + <value>icon_neutral.gif</value> + <value>15</value> + <value>17</value> + <value>39</value> + <value>1</value> + </row> + <row> + <value>40</value> + <value>:mrgreen:</value> + <value>Mr. Green</value> + <value>icon_mrgreen.gif</value> + <value>15</value> + <value>17</value> + <value>40</value> + <value>1</value> + </row> + <row> + <value>41</value> + <value>:geek:</value> + <value>Geek</value> + <value>icon_e_geek.gif</value> + <value>17</value> + <value>17</value> + <value>41</value> + <value>1</value> + </row> + <row> + <value>42</value> + <value>:ugeek:</value> + <value>Uber Geek</value> + <value>icon_e_ugeek.gif</value> + <value>17</value> + <value>18</value> + <value>42</value> + <value>1</value> + </row> + </table> + + <table name="phpbb_styles"> + <column>style_id</column> + <column>style_name</column> + <column>style_copyright</column> + <column>style_active</column> + <column>style_path</column> + <column>bbcode_bitfield</column> + <column>style_parent_id</column> + <column>style_parent_tree</column> + <row> + <value>1</value> + <value>prosilver</value> + <value>&copy; phpBB Group</value> + <value>1</value> + <value>prosilver</value> + <value>kNg=</value> + <value>0</value> + <value></value> + </row> + </table> + + <table name="phpbb_words"> + <column>word_id</column> + <column>word</column> + <column>replacement</column> + + <row> + <value>1</value> + <value>apple</value> + <value>banana</value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/default_lang.xml b/tests/text_formatter/s9e/fixtures/default_lang.xml new file mode 100644 index 0000000000..2cfde4aab2 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/default_lang.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + + <row> + <value>13</value> + <value>foo</value> + <value></value> + <value>1</value> + <value>[foo]{TEXT}[/foo]</value> + <value>{L_FOO_BAR}</value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/factory.xml b/tests/text_formatter/s9e/fixtures/factory.xml new file mode 100644 index 0000000000..9ae52e9747 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/factory.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>custom</value> + <value></value> + <value>1</value> + <value>[custom]{TEXT}[/custom]</value> + <value><span style="color:red">{TEXT}</span></value> + <value>!\[custom\](.*?)\[/custom\]!ies</value> + <value>'[custom:$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', '&#39;', '&#40;', '&#41;'), trim('${1}')).'[/custom:$uid]'</value> + <value>!\[custom:$uid\](.*?)\[/custom:$uid\]!s</value> + <value><span style="color:red">${1}</span></value> + </row> + <row> + <value>14</value> + <value>unsafe</value> + <value></value> + <value>1</value> + <value>[unsafe]{TEXT}[/unsafe]</value> + <value><script>{TEXT}</script></value> + <value>!\[unsafe\](.*?)\[/unsafe\]!ies</value> + <value>'[unsafe:$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', '&#39;', '&#40;', '&#41;'), trim('${1}')).'[/unsafe:$uid]'</value> + <value>!\[unsafe:$uid\](.*?)\[/unsafe:$uid\]!s</value> + <value><script>${1}</script></value> + </row> + </table> + + <table name="phpbb_smilies"> + <column>smiley_id</column> + <column>code</column> + <column>emotion</column> + <column>smiley_url</column> + <column>smiley_width</column> + <column>smiley_height</column> + <column>smiley_order</column> + <column>display_on_posting</column> + <row> + <value>1</value> + <value>:D</value> + <value>Very Happy</value> + <value>icon_e_biggrin.gif</value> + <value>15</value> + <value>17</value> + <value>2</value> + <value>1</value> + </row> + <row> + <value>4</value> + <value>:)</value> + <value>Smile</value> + <value>icon_e_smile.gif</value> + <value>15</value> + <value>17</value> + <value>4</value> + <value>1</value> + </row> + <row> + <value>10</value> + <value>:(</value> + <value>Sad</value> + <value>icon_e_sad.gif</value> + <value>15</value> + <value>17</value> + <value>10</value> + <value>1</value> + </row> + </table> + + <table name="phpbb_styles"> + <column>style_id</column> + <column>style_name</column> + <column>style_copyright</column> + <column>style_active</column> + <column>style_path</column> + <column>bbcode_bitfield</column> + <column>style_parent_id</column> + <column>style_parent_tree</column> + + <row> + <value>1</value> + <value>prosilver</value> + <value>&copy; phpBB Group</value> + <value>1</value> + <value>prosilver</value> + <value>kNg=</value> + <value>0</value> + <value></value> + </row> + </table> + + <table name="phpbb_words"> + <column>word_id</column> + <column>word</column> + <column>replacement</column> + + <row> + <value>1</value> + <value>apple</value> + <value>banana</value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/inttext_token.xml b/tests/text_formatter/s9e/fixtures/inttext_token.xml new file mode 100644 index 0000000000..30b971f315 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/inttext_token.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>spoiler=</value> + <value></value> + <value>1</value> + <value>[spoiler={INTTEXT}]{TEXT}[/spoiler]</value> + <value><![CDATA[<div class="spoiler"><div class="title">{INTTEXT}</div><div class="content">{TEXT}</div></div>]]></value> + <value><![CDATA[!\[spoiler\=([\p{L}\p{N}\-+,_. ]+)\](.*?)\[/spoiler\]!iues]]></value> + <value><![CDATA['[spoiler=${1}:$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${2}')).'[/spoiler:$uid]']]></value> + <value><![CDATA[!\[spoiler\=([\p{L}\p{N}\-+,_. ]+):$uid\](.*?)\[/spoiler:$uid\]!su]]></value><value><![CDATA[<div class="spoiler"><div class="title">${1}</div><div class="content">${2}</div></div>]]></value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/local_url.xml b/tests/text_formatter/s9e/fixtures/local_url.xml new file mode 100644 index 0000000000..9db2bf4710 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/local_url.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>local</value> + <value></value> + <value>1</value> + <value>[local]{LOCAL_URL}[/local]</value> + <value><![CDATA[<a href="{LOCAL_URL}">{LOCAL_URL}</a>]]></value> + <value><![CDATA[!\[local\]((?:[a-z0-9\-._~\!$&'()*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~\!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~\!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:#(?:[a-z0-9\-._~\!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?)\[/local\]!ie]]></value> + <value><![CDATA['[local:$uid]'.$this->bbcode_specialchars('${1}').'[/local:$uid]']]></value> + <value><![CDATA[!\[local:$uid\](?i)((?:[a-z0-9\-._~\!$&'()*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~\!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~\!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:#(?:[a-z0-9\-._~\!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?)(?-i)\[/local:$uid\]!s]]></value> + <value><![CDATA[<a href="http://path/to/phpBB/${1}">http://path/to/phpBB/${1}</a>]]></value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/preserve_comments.xml b/tests/text_formatter/s9e/fixtures/preserve_comments.xml new file mode 100644 index 0000000000..f81d366aad --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/preserve_comments.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>X</value> + <value></value> + <value>1</value> + <value>[X][/X]</value> + <value><![CDATA[<!-- comment -->]]></value> + <value><![CDATA[!\[x\]\[/x\]!i]]></value> + <value><![CDATA[[x:$uid][/x:$uid]]]></value> + <value><![CDATA[[x:$uid][/x:$uid]]]></value> + <value></value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml b/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml new file mode 100644 index 0000000000..9645f3e516 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/smilies_duplicate.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_smilies"> + <column>smiley_id</column> + <column>code</column> + <column>emotion</column> + <column>smiley_url</column> + <column>smiley_width</column> + <column>smiley_height</column> + <column>smiley_order</column> + <column>display_on_posting</column> + <row> + <value>1</value> + <value>:)</value> + <value>:)</value> + <value>foo.png</value> + <value>15</value> + <value>17</value> + <value>2</value> + <value>1</value> + </row> + <row> + <value>2</value> + <value>:)</value> + <value>:)</value> + <value>bar.png</value> + <value>15</value> + <value>17</value> + <value>2</value> + <value>2</value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/smilies_special_chars.xml b/tests/text_formatter/s9e/fixtures/smilies_special_chars.xml new file mode 100644 index 0000000000..d3a7cfa4f7 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/smilies_special_chars.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_smilies"> + <column>smiley_id</column> + <column>code</column> + <column>emotion</column> + <column>smiley_url</column> + <column>smiley_width</column> + <column>smiley_height</column> + <column>smiley_order</column> + <column>display_on_posting</column> + <row> + <value>1</value> + <value>"'<&></value> + <value>"'<&></value> + <value>"'<&>.png</value> + <value>15</value> + <value>17</value> + <value>2</value> + <value>1</value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/style_inheritance.xml b/tests/text_formatter/s9e/fixtures/style_inheritance.xml new file mode 100644 index 0000000000..a692d0ef2d --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/style_inheritance.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_styles"> + <column>style_id</column> + <column>style_name</column> + <column>style_copyright</column> + <column>style_active</column> + <column>style_path</column> + <column>bbcode_bitfield</column> + <column>style_parent_id</column> + <column>style_parent_tree</column> + + <row> + <value>1</value> + <value>foo</value> + <value></value> + <value>1</value> + <value>foo</value> + <!-- Bitfield for "b" only --> + <value>QA==</value> + <value>0</value> + <value></value> + </row> + <row> + <value>2</value> + <value>fooplus</value> + <value></value> + <value>1</value> + <value>fooplus</value> + <value>QA==</value> + <value>1</value> + <value></value> + </row> + <row> + <value>3</value> + <value>fooplusplus</value> + <value></value> + <value>1</value> + <value>fooplusplus</value> + <value>QA==</value> + <value>2</value> + <value></value> + </row> + <row> + <value>4</value> + <value>bar</value> + <value></value> + <value>1</value> + <value>bar</value> + <!-- Bitfield for "b" only --> + <value>QA==</value> + <value>0</value> + <value></value> + </row> + <row> + <value>5</value> + <value>barplus</value> + <value></value> + <value>1</value> + <value>barplus</value> + <value>QA==</value> + <value>4</value> + <value></value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/styles.xml b/tests/text_formatter/s9e/fixtures/styles.xml new file mode 100644 index 0000000000..8004412aea --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/styles.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_styles"> + <column>style_id</column> + <column>style_name</column> + <column>style_copyright</column> + <column>style_active</column> + <column>style_path</column> + <column>bbcode_bitfield</column> + <column>style_parent_id</column> + <column>style_parent_tree</column> + + <row> + <value>1</value> + <value>foo</value> + <value></value> + <value>1</value> + <value>foo</value> + <!-- Bitfield for "b" only --> + <value>QA==</value> + <value>0</value> + <value></value> + </row> + <row> + <value>2</value> + <value>bar</value> + <value></value> + <value>1</value> + <value>bar</value> + <!-- Bitfield for "b" only --> + <value>QA==</value> + <value>0</value> + <value></value> + </row> + </table> +</dataset> diff --git a/tests/text_formatter/s9e/fixtures/styles/bar/template/bbcode.html b/tests/text_formatter/s9e/fixtures/styles/bar/template/bbcode.html new file mode 100644 index 0000000000..76a35542be --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/styles/bar/template/bbcode.html @@ -0,0 +1,40 @@ +<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open --> +<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default --> +<!-- BEGIN ulist_close --></ul><!-- END ulist_close --> + +<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open --> +<!-- BEGIN olist_close --></ol><!-- END olist_close --> + +<!-- BEGIN listitem --><li><!-- END listitem --> +<!-- BEGIN listitem_close --></li><!-- END listitem_close --> + +<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open --> +<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open --> +<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close --> + +<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open --> +<!-- BEGIN code_close --></code></div><!-- END code_close --> + +<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open --> +<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close --> + +<!-- BEGIN b_open --><b><!-- END b_open --> +<!-- BEGIN b_close --></b><!-- END b_close --> + +<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open --> +<!-- BEGIN u_close --></span><!-- END u_close --> + +<!-- BEGIN i_open --><em><!-- END i_open --> +<!-- BEGIN i_close --></em><!-- END i_close --> + +<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color --> + +<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size --> + +<!-- BEGIN img --><img src="{URL}" class="postimage" alt="{L_IMAGE}" /><!-- END img --> + +<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url --> + +<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email --> + +<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash --> diff --git a/tests/text_formatter/s9e/fixtures/styles/barplus/template/bbcode.html b/tests/text_formatter/s9e/fixtures/styles/barplus/template/bbcode.html new file mode 100644 index 0000000000..fad8d828fd --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/styles/barplus/template/bbcode.html @@ -0,0 +1,40 @@ +<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open --> +<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default --> +<!-- BEGIN ulist_close --></ul><!-- END ulist_close --> + +<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open --> +<!-- BEGIN olist_close --></ol><!-- END olist_close --> + +<!-- BEGIN listitem --><li><!-- END listitem --> +<!-- BEGIN listitem_close --></li><!-- END listitem_close --> + +<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open --> +<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open --> +<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close --> + +<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open --> +<!-- BEGIN code_close --></code></div><!-- END code_close --> + +<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open --> +<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close --> + +<!-- BEGIN b_open --><b class="barplus"><!-- END b_open --> +<!-- BEGIN b_close --></b><!-- END b_close --> + +<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open --> +<!-- BEGIN u_close --></span><!-- END u_close --> + +<!-- BEGIN i_open --><em><!-- END i_open --> +<!-- BEGIN i_close --></em><!-- END i_close --> + +<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color --> + +<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size --> + +<!-- BEGIN img --><img src="{URL}" class="postimage" alt="{L_IMAGE}" /><!-- END img --> + +<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url --> + +<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email --> + +<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash --> diff --git a/tests/text_formatter/s9e/fixtures/styles/foo/template/bbcode.html b/tests/text_formatter/s9e/fixtures/styles/foo/template/bbcode.html new file mode 100644 index 0000000000..3e38d13a32 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/styles/foo/template/bbcode.html @@ -0,0 +1,40 @@ +<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open --> +<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default --> +<!-- BEGIN ulist_close --></ul><!-- END ulist_close --> + +<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open --> +<!-- BEGIN olist_close --></ol><!-- END olist_close --> + +<!-- BEGIN listitem --><li><!-- END listitem --> +<!-- BEGIN listitem_close --></li><!-- END listitem_close --> + +<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open --> +<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open --> +<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close --> + +<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open --> +<!-- BEGIN code_close --></code></div><!-- END code_close --> + +<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open --> +<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close --> + +<!-- BEGIN b_open --><strong><!-- END b_open --> +<!-- BEGIN b_close --></strong><!-- END b_close --> + +<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open --> +<!-- BEGIN u_close --></span><!-- END u_close --> + +<!-- BEGIN i_open --><em><!-- END i_open --> +<!-- BEGIN i_close --></em><!-- END i_close --> + +<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color --> + +<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size --> + +<!-- BEGIN img --><img src="{URL}" class="postimage" alt="{L_IMAGE}" /><!-- END img --> + +<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url --> + +<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email --> + +<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash --> diff --git a/tests/text_formatter/s9e/fixtures/unsafe_bbcode.xml b/tests/text_formatter/s9e/fixtures/unsafe_bbcode.xml new file mode 100644 index 0000000000..55a2e689b6 --- /dev/null +++ b/tests/text_formatter/s9e/fixtures/unsafe_bbcode.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<dataset> + <table name="phpbb_bbcodes"> + <column>bbcode_id</column> + <column>bbcode_tag</column> + <column>bbcode_helpline</column> + <column>display_on_posting</column> + <column>bbcode_match</column> + <column>bbcode_tpl</column> + <column>first_pass_match</column> + <column>first_pass_replace</column> + <column>second_pass_match</column> + <column>second_pass_replace</column> + + <row> + <value>13</value> + <value>xss=</value> + <value></value> + <value>1</value> + <value>[xss={TEXT1}]{TEXT2}[/xss]</value> + <value><![CDATA[<a href="{TEXT1}">{TEXT2}</a>]]></value> + <value><![CDATA[!\[xss\=(.*?)\](.*?)\[/xss\]!ies]]></value> + <value><![CDATA['[xss='.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${1}')).':$uid]'.str_replace(array("\r\n", '\"', '\'', '(', ')'), array("\n", '"', ''', '(', ')'), trim('${2}')).'[/xss:$uid]']]></value> + <value><![CDATA[!\[xss\=(.*?):$uid\](.*?)\[/xss:$uid\]!s]]></value> + <value><![CDATA[<a href="${1}">${2}</a>]]></value> + </row> + </table> +</dataset> |