Простое удаление android:layout_columnWeight="1"
и android:layout_rowWeight="1"
решит проблему.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_weight="100">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/reletive" >
<TextView
android:id="@+id/output"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:text="Hello World!"
android:gravity="end" />
<TextView
android:id="@+id/input"
android:layout_below="@+id/output"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
android:text="Hello World!"
android:gravity="end"/>
</RelativeLayout>
<GridLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="InvalidId"
android:layout_below="@+id/reletive"
android:numColumns="5">
<Button
android:layout_row="0"
android:layout_column="0"
android:text="1"/>
<Button
android:layout_row="0"
android:layout_column="1"
android:text="1"/>
<Button
android:layout_row="0"
android:layout_column="2"
android:text="1"/>
<Button
android:layout_row="0"
android:layout_column="3"
android:text="1"/>
<Button
android:layout_row="0"
android:layout_column="4"
android:text="1"/>
<Button
android:layout_row="1"
android:layout_column="0"
android:text="1"/>
<Button
android:layout_row="1"
android:layout_column="1"
android:text="1"/>
<Button
android:layout_row="1"
android:layout_column="2"
android:text="1"/>
<Button
android:layout_row="1"
android:layout_column="3"
android:text="1"/>
<Button
android:layout_row="1"
android:layout_column="4"
android:text="1"/>
</GridLayout>
</RelativeLayout>
Для очистки строк, я был бы HTML кодировать весь вывод, тот способ, которым Вы не должны укорачивать вокруг со специальными символами или огромными regex выражениями
Server.HTMLEncode(string)
Две самых важных контрмеры для предотвращения атак с использованием кросс-сайтовых сценариев к:
через Как К: Предотвратите Сценарии перекрестного Сайта в ASP.NET (я знаю i'ts не классический asp, но существуют подобные принципалы),
Когда функции не будут существовать в классическом ASP, запишите им.
Не легко - необходимо было бы сделать ОБЕРТКУ ДЛЯ COM-ВЫЗОВОВ, установку на серверах, и т.д. Я просто не думаю, что это - подходящее пригодное для "классического" ASP.
If you do have to allow certain HTML tags (as I do in my current project), you can use a regex to allow only those tags and no others, like so:
set objRegExp = new RegExp
with objRegExp
.Pattern = "<^((b)|(i)|(em)|(strong)|(br))>.*</.*>"
.IgnoreCase = varIgnoreCase
.Global = True
end with
cleanString = objRegExp.replace(originalString, "")